Open tymonx opened 1 year ago
It is not possible to allow or deny some words per selected files.
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:
alex some/folder/example.md
.some/folder/.alexrc
or some/.alexrc
or .alexrc
or even higher.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 https://github.com/unifiedjs/unified-engine/issues/56.
But this allow these words in all files.
Each folder can have its own config file.
Other alternative is using .alexignore file but this will ignore content of whole file and there is also still this issue
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: https://github.com/get-alex/alex/issues/170