Commit Graph

52 Commits

Author SHA1 Message Date
Pedro Algarvio
f0f3fb2de6 Add __instance_id__ as a known global variable 2015-01-30 22:27:20 +00:00
Pedro Algarvio
a912d0b268 Fix the __jid_event__ removed during the rebase 2015-01-30 22:27:08 +00:00
Pedro Algarvio
2344ead46f The string module is not deprecated, only some functions of it. 2015-01-30 22:27:08 +00:00
Pedro Algarvio
f51672ac30 Update PyLint RC files to support 1.4.0 options 2015-01-30 22:27:00 +00:00
Pedro Algarvio
c3e662db7c Make use of the smartup PyLint plugin. 2015-01-30 22:25:20 +00:00
Pedro Algarvio
31da005e02 Update pylintrc to load the python 3 modernize plugin 2015-01-30 22:25:01 +00:00
rallytime
4648530a50 Fix pylint on develop 2015-01-30 12:56:52 -07:00
rallytime
9898fcf613 Merge branch '2015.2' into 'develop'
Conflicts:
	.gitignore
	.pylintrc
	.testing.pylintrc
	salt/client/mixins.py
	salt/cloud/clouds/msazure.py
	salt/config.py
	salt/modules/mount.py
	salt/runners/doc.py
	salt/utils/event.py
	salt/utils/reactor.py
2015-01-29 17:24:04 -07:00
Thomas Jackson
4df4a297cb Remove __progress__ from lint checks, and add in jid_event 2015-01-28 18:43:43 -08:00
rallytime
dc23823897 Merge branch '2014.7' into '2015.2'
Conflicts:
	salt/modules/localemod.py
2015-01-27 13:24:14 -07:00
Colton Myers
ce9d2cb6cb Merge remote-tracking branch 'upstream/2014.7' into merge-forward-2015.2
Conflicts:
	.pylintrc
	.testing.pylintrc
	salt/states/file.py
	salt/utils/__init__.py
2015-01-26 15:53:05 -07:00
Thomas S Hatch
efa3bd615a Merge pull request #20048 from s0undt3ch/features/use-saltpylint
Make use of the SaltPyLint package separated from SaltTesting
2015-01-26 15:37:09 -07:00
Thomas S Hatch
074c408a51 Add __instance_id__ to pylint checks as this has been added to
the active state runs for state run tracking
2015-01-26 15:22:18 -07:00
Pedro Algarvio
472bf88d47 Make use of the SaltPyLint package separated from SaltTesting 2015-01-26 02:10:30 +00:00
Thomas Jackson
1e1107272a Remove __progress__ from lint checks, and add in jid_event 2015-01-10 16:31:59 -08:00
Pedro Algarvio
10a7ead2df Add file perms pylint plugin specific settings 2015-01-06 21:23:19 -07:00
Pedro Algarvio
8976d00bbe Enable file permissions lint checker.
This will allow us to confirm that no modules are added to salt with the
wrong file permissions. Default file permissions is 0644.
2015-01-06 21:23:19 -07:00
Thomas S Hatch
6dd8f40c7b Merge pull request #19073 from s0undt3ch/features/file-perms-lint-2014.7
Enable file permissions lint checker
2014-12-18 09:41:03 -07:00
Pedro Algarvio
2e9026395f Add file perms pylint plugin specific settings 2014-12-18 05:35:19 +00:00
Pedro Algarvio
6e39a1e678 Enable file permissions lint checker.
This will allow us to confirm that no modules are added to salt with the
wrong file permissions. Default file permissions is 0644.
2014-12-18 05:35:19 +00:00
Pedro Algarvio
fdc39d0413 Remove deprecated options 2014-12-08 22:24:19 +00:00
Pedro Algarvio
e09750e97d Ignore the locally enabled/disabled pylint checks 2014-12-01 03:24:41 +00:00
Pedro Algarvio
1dbcae31b9 Ignore the locally enabled/disabled pylint checks 2014-11-28 15:50:40 +00:00
Thomas S Hatch
47a1408d09 fix linter per #17725 2014-11-14 09:50:14 -07:00
Pedro Algarvio
852f47ea19 Remove deprecated and ignored PyLint options 2014-11-13 01:49:43 +00:00
Thomas S Hatch
16584043ff add progress to builtins to handle new runner stuff 2014-11-11 09:57:37 -07:00
Thomas S Hatch
3689c0608e Add __master_opts to pylintrc exclusions 2014-09-23 21:30:18 -06:00
Pedro Algarvio
9fb4a2e7c3 PyLint ignore C0330 (bad-continuation) 2014-05-29 11:39:00 +01:00
Pedro Algarvio
57701e0a75 Update .pylintrc and .testing.pylintrc to new max line length 2014-03-21 21:04:02 +00:00
Pedro Algarvio
bdcf244155 __states__ is also a Salt global variable 2014-02-24 20:11:59 +00:00
Pedro Algarvio
6488c85fd6 Add __lowstate__ and __running__ to both PyLint rc's 2013-11-26 19:11:38 +00:00
Pedro Algarvio
5e2b208cd0 Renamed __state__ to __low__. 2013-11-26 09:25:00 +00:00
Pedro Algarvio
a752421b87 Expose a copy of the state dictionary to state functions.
Fixes #8343 since `__sls__` is now available in `__state__` and not on `kwargs`.
Closes #8709 since it's not the right approach.
Fixes #8710 and closes #8711 since I've cherry-picked the fix for #8710 in from #8711.
2013-11-24 11:08:33 +00:00
Pedro Algarvio
ff6e7997ff ABOLISH un-indexed curly braces on strings to format!!!! 2013-11-11 02:20:48 +00:00
Thomas S Hatch
fbba52a46d Add __active_provider_name__ to pylint builtins 2013-11-08 17:14:12 -07:00
Pedro Algarvio
5c09aa1460 Check PEP8 using Pylint 2013-10-06 16:18:29 +01:00
Henrik Holmboe
8d90c7c111 Detect "FIX" comments with pylint 2013-10-04 16:15:00 +02:00
Pedro Algarvio
5d81966e5f Enable PEP263 pylint plugin. Fixes #7294. 2013-09-20 17:53:07 +01:00
Pedro Algarvio
f6be07069a Adapt .pylintrc design settings to Salt's reality. 2013-07-15 12:37:46 +01:00
Chris Rebert
18bdf193d3 have pylint ignore __env__ too 2013-05-17 15:50:02 -06:00
Pedro Algarvio
cc65301cc2 Merge branch 'develop' of github.com:saltstack/salt into hotfix/pylint/C0103 2012-12-30 15:58:16 +00:00
Pedro Algarvio
e92d5e0db2 Add __ret__ to additional-builtins config var on .pylintrc. Refs #1775. 2012-12-29 18:07:38 +00:00
Pedro Algarvio
79b7067256 W0142 added to .pylintrc disabled checkers.
`W0142` is triggered when `*` or `**` magic is used, for example:

```python
my_func(*args, **kwargs)
```

This PyLint checker is now disabled since we use it quite a lot, and, in fact, take advantage of this magic.
2012-12-29 16:15:35 +00:00
Pedro Algarvio
9eea488abf Merge branch 'develop' of github.com:saltstack/salt into hotfix/pylint/C0103 2012-12-28 22:59:23 +00:00
Pedro Algarvio
d6e01359bc Updated .pylintrc. Max arguments are now 35, max lines 3000. Refs #1775. 2012-12-28 22:55:14 +00:00
Pedro Algarvio
d6cd6174d6 Include ID's in the reports. 2012-12-28 15:51:13 +00:00
Pedro Algarvio
66e3bea992 Add __context__ to .pylintrc 2012-12-28 13:35:29 +00:00
Pedro Algarvio
caea4625f7 Add log to .pylintrc good names setting. Refs #1775. 2012-12-28 10:54:28 +00:00
Pedro Algarvio
06ab864c12 Oops, we can't just exit on the init-hook.
The encoded string now looks like:
```python
import os, sys

if 'VIRTUAL_ENV' in os.environ:

    ve_dir = os.environ['VIRTUAL_ENV']
    ve_dir in sys.path or sys.path.insert(0, ve_dir)
    activate_this = os.path.join(os.path.join(ve_dir, 'bin'), 'activate_this.py')

    # Fix for windows
    if not os.path.exists(activate_this):
        activate_this = os.path.join(os.path.join(ve_dir, 'Scripts'), 'activate_this.py')

    execfile(activate_this, dict(__file__=activate_this))
```
2012-12-27 15:14:02 +00:00
Pedro Algarvio
45bcbef05a Add virtualenv support to .pylintrc
Include the current active virtualenv into pylint's init-hook.
The `base64` encoded string is:
```python
import sys, os

if 'VIRTUAL_ENV' not in os.environ:
    sys.exit(0)

ve_dir = os.environ['VIRTUAL_ENV']
ve_dir in sys.path or sys.path.insert(0, ve_dir)
activate_this = os.path.join(os.path.join(ve_dir, 'bin'), 'activate_this.py')

if not os.path.exists(activate_this):
    activate_this = os.path.join(os.path.join(ve_dir, 'Scripts'), 'activate_this.py')

execfile(activate_this, dict(__file__=activate_this))
```
2012-12-27 15:02:40 +00:00