-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
The .alexrc.yml file should allow or deny words per selected file #340
Comments
You can allow/deny words from within files if you like, with comments: https://github.com/get-alex/alex#control. Config files work the other way around:
I don’t like the idea of having more globs or file paths inside config files to infinite recurse, and which would prevent sharing config files. This issue is tracked at unifiedjs/unified-engine#56.
Each folder can have its own config file.
I don‘t understand your problems with ignore files. I don’t see why there is an issue there? |
Subject of the feature
The
.alexrc.yml
file shouldallow
ordeny
words per selected file.Problem
It is not possible to allow or deny some words per selected files. Sometimes is needed to allow some words in files but in other files not. For example license Apache 2.0 file contains
executed
andfailure
words.Download Apache 2.0 file:
Run
alex
:It returns status code
1
and prints:Creating
.alexignore
file is not an option because of these issues:Also it will entirely ignore content of whole file and this is also not desired.
Expected behaviour
Create
.alexrc.yml
with this content:It will be also nice if the
file:
entry will also support glob*.txt
,**/*.cpp
or regexp.*\.md$
patterns.Still it should be possible to have backward compatibility with this YAML schema:
Because it almost all YAML parser libraries it is possible to retrieve YAML type:
!!seq
is YAML list[]
!!map
is YAML object{}
Alternatives
Create
.alexrc.yml
with this content:But this allow these words in all files.
Other alternative is using
.alexignore
file but this will ignore content of whole file and there is also still this issue: #170The text was updated successfully, but these errors were encountered: