Ines Almeida has proposed merging ~ines-almeida/txpkgupload:add-pre-commit-file into txpkgupload:master.
Commit message: Add pre-commit-config file to repo Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~ines-almeida/txpkgupload/+git/txpkgupload/+merge/445985 This is a copy of the pre-commit config file from launchpad's repo -- Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/txpkgupload:add-pre-commit-file into txpkgupload:master.
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..dab74e2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,103 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-merge-conflict + - id: check-json + exclude: | + (?x)^( + lib/lp/services/sitesearch/tests/data/bingsearchservice-incomplete-response\.json + )$ + - id: check-xml + exclude: | + (?x)^( + lib/lp/bugs/tests/testfiles/broken_bug_li_item\.xml| + lib/lp/bugs/tests/testfiles/unescaped_control_character.xml + )$ + - id: check-yaml + - id: debug-statements + exclude: systemdocs\.py + - id: file-contents-sorter + files: ^\.codespell-ignore + - id: no-commit-to-branch + args: [--branch, master, --branch, db-devel] +- repo: https://github.com/asottile/pyupgrade + rev: v3.3.1 + hooks: + - id: pyupgrade + args: [--keep-percent-format] + exclude: | + (?x)^( + lib/contrib/.* + |utilities/community-contributions\.py + )$ +- repo: https://github.com/psf/black + rev: 22.12.0 + hooks: + - id: black + exclude: | + (?x)^( + lib/contrib/.* + |utilities/community-contributions\.py + )$ +- repo: https://github.com/PyCQA/isort + rev: 5.12.0 + hooks: + - id: isort + name: isort + args: [--profile, black] +- repo: https://github.com/PyCQA/flake8 + # 6.0.0 drops support for `# type:` comments, which we need until we + # upgrade to Python >= 3.6. + rev: 5.0.4 + hooks: + - id: flake8 + exclude: ^lib/contrib/ + additional_dependencies: + - flake8-absolute-import==1.0.0.1 + - flake8-alfred==1.1.1 +- repo: https://github.com/pre-commit/mirrors-eslint + rev: v8.33.0 + hooks: + - id: eslint + args: [--quiet] +- repo: https://github.com/keewis/blackdoc + rev: v0.3.8 + hooks: + - id: blackdoc + args: ["-l", "78"] + exclude: ^doc/.* +- repo: https://git.launchpad.net/lp-lint-doctest + rev: '0.5' + hooks: + - id: lp-lint-doctest + args: [--allow-option-flag, IGNORE_EXCEPTION_MODULE_IN_PYTHON2] + exclude: ^doc/.* +- repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.9.0.2 + hooks: + - id: shellcheck +- repo: https://github.com/codespell-project/codespell + rev: v2.2.2 + hooks: + - id: codespell + args: ["-I", ".codespell-ignore"] + files: ^(.*\.js|.*\.rst)$ + exclude: | + (?x)^( + # URL-encoding of "foƶ". + lib/lp/bugs/doc/bugattachments\.rst + # Quoted-printable encoding. + |lib/lp/code/doc/branch-notifications\.rst + # Word truncated by stemming. + |lib/lp/services/database/doc/textsearching\.rst + )$ +- repo: https://github.com/get-woke/woke + rev: v0.19.0 + hooks: + - id: woke-from-source + files: ^doc/.*\.rst$
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp