Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit checks: Remove duplicated checks in pylint-odoo #267

Closed
moylop260 opened this issue Dec 19, 2019 · 4 comments · Fixed by #396
Closed

pre-commit checks: Remove duplicated checks in pylint-odoo #267

moylop260 opened this issue Dec 19, 2019 · 4 comments · Fixed by #396
Assignees

Comments

@moylop260
Copy link
Collaborator

Discuss the best way to deprecate duplicated checks of pre-commit.

Check the following comment:
OCA/maintainer-quality-tools#623 (comment)

Another example is the pylint-odoo check called javascript-lint it is duplicated using eslint in pre-commit.

And so on.

We need define a pylint-odoo version to deprecated all them.

Help is welcome!

@yajo
Copy link
Member

yajo commented Jan 27, 2020

I was just gonna ask this about the js part. IMHO it should be removed from here, as it's gonna be out of sync soon, as you can see in OCA/maintainer-quality-tools#630.

@moylop260
Copy link
Collaborator Author

I agree
eslint must be deprecated from pylint-odoo

@moylop260
Copy link
Collaborator Author

moylop260 commented Jun 8, 2022

@antonag32

Could you remove all the custom lints that already exists from other lints compatible with pre-commit, please?

e.g. utf-8 comment, shebang, newlines, eslint and so on

And put in the commit message what is the replace, please?

Check the following pre-commit lints:

- repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.2.0
    hooks:
      - id: trailing-whitespace
        # exclude autogenerated files
        exclude: /README\.rst$|\.pot?$
      - id: end-of-file-fixer
        # exclude autogenerated files
        exclude: /README\.rst$|\.pot?$
      - id: debug-statements
      - id: fix-encoding-pragma
        args: ["--remove"]
      - id: check-case-conflict
      - id: check-docstring-first
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
        # exclude files where underlines are not distinguishable from merge conflicts
        exclude: /README\.rst$|^docs/.*\.rst$
      - id: debug-statements
      - id: check-symlinks
      - id: check-xml
      - id: mixed-line-ending
        args: ["--fix=lf"]
 - repo: https://github.com/Lucas-C/pre-commit-hooks
    rev: v1.1.10
    hooks:
      - id: forbid-crlf
      - id: remove-crlf
      - id: forbid-tabs
        exclude: (Makefile|debian/rules|.gitmodules|\.po|\.pot)(\.in)?$
      - id: remove-tabs
        exclude: (Makefile|debian/rules|.gitmodules|\.po|\.pot)(\.in)?$
 - repo: https://github.com/pre-commit/mirrors-eslint
    rev: v7.32.0
    hooks:
      - id: eslint
        verbose: true
        args:
          - --color
          - --fix

BTW Consider apply the changes for VX/MQT to enable the lint from pre-commit if you disable it from pylint-odoo

@antonag32
Copy link
Contributor

antonag32 commented Jun 24, 2022

Working on it on a fork as of now.
antonag32#2

Each commit where a pylint-odoo message is removed explains what is its replacement. The plan is that once everything is set a PR will be made to this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants