diff options
Diffstat (limited to '')
-rw-r--r-- | .flake8 | 123 |
1 files changed, 123 insertions, 0 deletions
@@ -0,0 +1,123 @@ +[flake8] + +# Don't even try to analyze these: +exclude = + # No need to traverse egg files + *.egg, + # No need to traverse egg info dir + *.egg-info, + # No need to traverse eggs directory + .eggs, + # No need to traverse our git directory + .git, + # GitHub configs + .github, + # Cache files of MyPy + .mypy_cache, + # Cache files of pytest + .pytest_cache, + # Temp dir of pytest-testmon + .tmontmp, + # Countless third-party libs in venvs + .tox, + # Occasional virtualenv dir + .venv + # VS Code + .vscode, + # There's no value in checking cache directories + __pycache__, + # Temporary build dir + build, + # This contains sdists and wheels of ansible-lint that we don't want to check + dist, + # Occasional virtualenv dir + env, + # Metadata of `pip wheel` cmd is autogenerated + pip-wheel-metadata, + +# Let's not overcomplicate the code: +max-complexity = 10 + +# Accessibility/large fonts and PEP8 friendly: +#max-line-length = 79 +# Accessibility/large fonts and PEP8 unfriendly: +max-line-length = 100 + +# Allow certain violations in certain files: +per-file-ignores = + # FIXME: D100 Missing docstring in public module + # FIXME: D101 Missing docstring in public class + # FIXME: D102 Missing docstring in public method + # FIXME: D103 Missing docstring in public function + # FIXME: drop these once they're made simpler + # Ref: https://github.com/ansible/ansible-lint/issues/744 + # lib/ansiblelint/__main__.py:32:1: C901 'main' is too complex (12) + lib/ansiblelint/__main__.py: C901 + lib/ansiblelint/cli.py: D101 D102 D103 + lib/ansiblelint/formatters/__init__.py: D101 D102 + lib/ansiblelint/utils.py: D103 + lib/ansiblelint/rules/*.py: D100 D101 D102 + + # FIXME: drop these once they're fixed + # Ref: https://github.com/ansible/ansible-lint/issues/725 + test/__init__.py: D102 + test/conftest.py: D100 D103 + test/rules/EMatcherRule.py: D100 D101 D102 + test/rules/UnsetVariableMatcherRule.py: D100 D101 D102 + test/TestAlwaysRunRule.py: PT009 D100 D101 D102 + test/TestAnsibleLintRule.py: D100 D103 + test/TestBaseFormatter.py: D100 D103 + test/TestBecomeUserWithoutBecome.py: PT009 D100 D101 D102 + test/TestCliRolePaths.py: PT009 D100 D101 D102 + test/TestCommandLineInvocationSameAsConfig.py: D100 D103 + test/TestCommandHasChangesCheck.py: PT009 D100 D101 D102 + test/TestComparisonToEmptyString.py: PT009 D100 D101 D102 + test/TestComparisonToLiteralBool.py: PT009 D100 D101 D102 + test/TestDependenciesInMeta.py: D100 D103 + test/TestDeprecatedModule.py: PT009 D100 D101 D102 + test/TestEnvVarsInCommand.py: PT009 D100 D101 D102 + test/TestFormatter.py: D100 D101 D102 + test/TestImportIncludeRole.py: D100 D103 + test/TestImportWithMalformed.py: D100 D103 + test/TestIncludeMissingFileRule.py: D100 D103 + test/TestIncludeMissFileWithRole.py: D100 D103 + test/TestLineNumber.py: D100 + test/TestLineTooLong.py: PT009 D100 D101 D102 + test/TestLintRule.py: PT009 D100 D101 D102 + test/TestNestedJinjaRule.py: D100 D103 + test/TestMatchError.py: D101 + test/TestMetaChangeFromDefault.py: PT009 D100 D101 D102 + test/TestMetaMainHasInfo.py: PT009 D100 D101 D102 + test/TestMetaTagValid.py: PT009 D100 D101 D102 + test/TestMetaVideoLinks.py: PT009 D100 D101 D102 + test/TestNoFormattingInWhenRule.py: PT009 D100 D101 D102 + test/TestOctalPermissions.py: PT009 D100 D101 D102 + test/TestPackageIsNotLatest.py: PT009 D100 D101 D102 + test/TestPretaskIncludePlaybook.py: D100 D103 + test/TestRoleHandlers.py: PT009 D100 D101 D102 + test/TestRoleRelativePath.py: PT009 D100 D101 D102 + test/TestRuleProperties.py: D100 D103 + test/TestRulesCollection.py: D100 D103 + test/TestRunner.py: D100 D103 + test/TestShellWithoutPipefail.py: PT009 D100 D101 D102 + test/TestSkipImportPlaybook.py: D100 D103 + test/TestSkipInsideYaml.py: D100 D103 + test/TestSkipPlaybookItems.py: D100 D103 + test/TestSudoRule.py: PT009 D100 D101 D102 + test/TestTaskHasName.py: PT009 D100 D101 D102 + test/TestTaskIncludes.py: D100 D103 + test/TestTaskNoLocalAction.py: PT009 D100 D101 D102 + test/TestUseCommandInsteadOfShell.py: PT009 D100 D101 D102 + test/TestUseHandlerRatherThanWhenChanged.py: PT009 D100 D101 D102 + test/TestUsingBareVariablesIsDeprecated.py: PT009 D100 D101 D102 + test/TestVariableHasSpaces.py: PT009 D100 D101 D102 + test/TestWithSkipTagId.py: PT009 D100 D101 D102 + +# flake8-pytest-style +# PT001: +pytest-fixture-no-parentheses = true +# PT006: +pytest-parametrize-names-type = tuple +# PT007: +pytest-parametrize-values-type = tuple +pytest-parametrize-values-row-type = tuple |