Closed Licenser closed 4 years ago
Hi there, welcome!
Could you provide more info? Unfortunately you removed the issue template. Filling that in really helps us help you. See https://github.com/get-alex/.github/blob/master/.github/ISSUE_TEMPLATE/1-bug.md and https://github.com/get-alex/.github/blob/master/support.md#asking-quality-questions
Hi! I can add those but I didn't remove the template, the "question" template (I don't think it's a bug, just a question) I used is empty other than a comment in the beginning.
I found that for .md
files using alex .
instead of alex
solves the issue, but it persists when using files Alex doesn't discover automatically.
Dealing with
mkdir example
cd example
mkdir src
mkdir ignored
touch src/bad.rs
echo "poop" > src/bad.rs
touch ignored/something.rs
echo "ignored/**" > .alexignore
alex **/*.rs
cd ..
A way to achieve "all files of this type but not the ignored ones".
I've no preference how this works a few ideas however:
--allow-ignored-globs
(toggels the behaviour)--discover-extensions rs -e markdown -e md -e txt
(allow adding extensions to discover via alex .
I could not find a way to include files where folders are ignored that might also match the pattern without Alex erroring.
Ahh good, sorry, my mistake, I should fix that 😅
I think I almost understand your question.
It seems your original and the new explanaintion are different? Because the original question should be supported as alex .
, with a couple of globs in an .alexignore
file?
So is the question about new extensions, such as .rs
?
One solution is to specify all subfolders but with 15 and growing that's really painful :(
Instead of generalizing the question, could you provide exactly what you do? What alex ...
looks like, and what the .alexignore
file looks like?
This pretty much sums the issue up:
mkdir example
cd example
mkdir src
mkdir ignored
touch src/bad.rs
echo "poop" > src/bad.rs
touch ignored/something.rs
echo "ignored/**" > .alexignore # ignore file
alex **/*.rs # alex call
cd ..
alex .
seems to work fine for files that are recognized if not it's not
Right. To confirm, the question then is about new extensions, such as .rs? You don’t have problems if the extension is .md
?
Yes, I think alex .
solves the issue for recognized files, or at least I couldn't reproduce it after finding that so it looks like being related only to additional extensions.
Several thoughts on this:
-e, --ext
to the cli--silently-ignore
flagI don’t feel very strongly about 2 and 3, because of 1 🤔 The whole reason for having the error in place, is that it’s probably a user error and being silent is often unexpected to users.
Hi, I'm running in some issues with using .alexignore and globs. The basic problem I'm trying to solve is:
.md
files.md
files in this and all folders underneath it (i.e.**/*.md
)This will cause an error that the ignored
.md
file is included.One solution is to specify all subfolders but with 15 and growing that's really painful :(