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

Pyright reports an error when PYTHON_PYRIGHT_CONFIG_FILE is set #1946

Closed
d-mankowski-synerise opened this issue Oct 8, 2022 · 1 comment · Fixed by #1948
Closed

Pyright reports an error when PYTHON_PYRIGHT_CONFIG_FILE is set #1946

d-mankowski-synerise opened this issue Oct 8, 2022 · 1 comment · Fixed by #1948
Labels
bug Something isn't working

Comments

@d-mankowski-synerise
Copy link

d-mankowski-synerise commented Oct 8, 2022

Describe the bug
Pyright reports an error when PYTHON_PYRIGHT_CONFIG_FILE is set

To Reproduce
Steps to reproduce the behavior:

  • enable linter PYTHON_PYRIGHT
  • set PYTHON_PYRIGHT_CONFIG_FILE: .pyrightconfig.json in .mega-linter.yml
  • set LINTER_RULES_PATH: .linters
  • create folder .linters and put there .pyrightconfig.json
  • run linter
  • it ends with the following message:
❌ Linted [PYTHON] files with [pyright]: Found 1 error(s) - (15.68s)
- Using [pyright v1.1.270] https://oxsecurity.github.io/megalinter/latest/descriptors/python_pyright
- MegaLinter key: [PYTHON_PYRIGHT]
- Rules config: [/.linters/.pyrightconfig.json]
- Number of files analyzed: [1]
--Error detail:
Unexpected option -c.
pyright --help for usage

It seems the proper option to specify config folder is -p, not -c:

❯ pyright --help | grep config
  -p,--project <FILE OR DIRECTORY>   Use the configuration file at this location

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Additional context

------------------------------------ MegaLinter, by OX Security ------------------------------------
----------------------------------------------------------------------------------------------------
 - Image Creation Date: 2022-10-03T06:14:22Z
 - Image Revision: 88a858e
 - Image Version: v6
@d-mankowski-synerise d-mankowski-synerise added the bug Something isn't working label Oct 8, 2022
@nvuillam
Copy link
Member

nvuillam commented Oct 8, 2022

Good catch :)

nvuillam added a commit that referenced this issue Oct 8, 2022
* [automation] Auto-update linters version, help and documentation

* Downgrade ansible-lint

* Use -p argument for pyright custom config file path

Fixes #1946

* changelog
nvuillam added a commit that referenced this issue Oct 8, 2022
* [automation] Auto-update linters version, help and documentation

* Downgrade ansible-lint

* Use -p argument for pyright custom config file path

Fixes #1946

* changelog

* Fix use of TERRAFORM_KICS_ARGUMENTS

Fixes #1947

* [automation] Auto-update linters version, help and documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants