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

CSpell doesn't allow to pass SPELL_CSPELL_FILE_EXTENSIONS argument? #1997

Closed
bdovaz opened this issue Oct 24, 2022 · 10 comments
Closed

CSpell doesn't allow to pass SPELL_CSPELL_FILE_EXTENSIONS argument? #1997

bdovaz opened this issue Oct 24, 2022 · 10 comments
Labels
bug Something isn't working O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity

Comments

@bdovaz
Copy link
Collaborator

bdovaz commented Oct 24, 2022

It's not documented: https://oxsecurity.github.io/megalinter/latest/descriptors/spell_cspell/#readme

And of course it's because it's not in descriptor: https://github.com/oxsecurity/megalinter/blob/79fe208cb54ecb10f90e65b1bb8cc04065273832/megalinter/descriptors/spell.megalinter-descriptor.yml

Is it because of something in particular? Because it seems that it does support it: http://cspell.org/docs/globs/

@bdovaz bdovaz added the bug Something isn't working label Oct 24, 2022
@nvuillam
Copy link
Member

language linters have a specific behaviour: they analyze files that are analysed by other linters

@bdovaz
Copy link
Collaborator Author

bdovaz commented Oct 24, 2022

You mean if I throw these linters:

  • json: with *.json
  • yml: with *.yml
  • cspell -> is going to be *.json, *.yml the filter?

Is this explained somewhere? It is not easy to understand.

Also, what happens if I only want to launch the cspell linter? In that case is it going to be * . *?

@nvuillam
Copy link
Member

Also, what happens if I only want to launch the cspell linter? In that case is it going to be * . *?

Nope, nothing will be linted ^^

#1976

And you're right, it should be explained somewhere.... and maybe we should manage that if FILE_EXTENSIONS is user-defined, it was taken in account except the default behaviour to use other linters files

@bdovaz
Copy link
Collaborator Author

bdovaz commented Oct 24, 2022

I agree.

The parameter "SPELL_CSPELL_FILE_EXTENSIONS" (which does not exist now) should serve to override the current behavior that is not documented. If this parameter is defined, it overrides that behavior.

@nvuillam
Copy link
Member

If you are in a mood for a PR... it will probably happen here :)

if lint_all_other_linters_files is False:

@bdovaz
Copy link
Collaborator Author

bdovaz commented Oct 24, 2022

I would try but I don't feel comfortable with python (my world is in .NET) in terms of experience in it nor do I know the guts of megalinter to make this change....

I'll wait for when you can implement it.

@bdovaz
Copy link
Collaborator Author

bdovaz commented Oct 24, 2022

@nvuillam I created a draft PR, can you help/guide me please? Thanks.

@nvuillam
Copy link
Member

@nvuillam I created a draft PR, can you help/guide me please? Thanks.

You're close :)

@bdovaz
Copy link
Collaborator Author

bdovaz commented Oct 30, 2022

@nvuillam I see that you have merged it but I don't see that it appears in the beta documentation, shouldn't it show up?

https://oxsecurity.github.io/megalinter/beta/descriptors/spell_cspell/

I say this in case there is something missing in some descriptor or some condition of that PR that is not correct.

Thanks.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Nov 30, 2022
@bdovaz bdovaz closed this as completed Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity
Projects
None yet
Development

No branches or pull requests

2 participants