Comments (7)
@schorlton @wesley-dean-flexion I have an idea, I hope it will work ;)
https://github.com/oxsecurity/megalinter/pull/3409/files
from megalinter.
https://megalinter.io/latest/descriptors/spell_vale/
To be active within MegaLinter, you need to initialize a .vale.ini configuration file at the root of your repository.
So, that behavior you're seeing makes sense.
That said, why wouldn't SPELL_VALE_CONFIG_FILE
pointing to a different location also change that behavior? That's... a good question. I'll look into it and comment back; I just wanted to get something back to you as quickly as possible so as to hopefully unblock you.
from megalinter.
from megalinter.
@schorlton a couple of thoughts:
- I don't know if
active_only_if_file_found
can accept an extended glob (**/*/.vale.ini
) or a regex (\.vale\.ini$
) or something like that, so if Vale's only going to run when there's a.vale.ini
somewhere, I don't know how to have Megalinter look in multiple locations for it - running the Vale container without a configuration file causes Vale to throw an error, so allowing Vale to run when there isn't a config file somewhere where it's looking will cause Vale to throw an error.
E100 [.vale.ini not found] Runtime error
no config file found
Execution stopped with code 1.
I don't think we want Vale to run and fail unnecessarily (I don't think most people use it, actually) so unless there's a way to have that active_only_if_file_found
to respect the SPELL_VALE_CONFIG_FILE
parameter, I'm not sure how to proceed.
Would having a symlink from wherever the config file actually lives point back to the project root work? (e.g., ln -s "path/to/real/.vale.ini" "$(git rev-parse --show-toplevel)/.vale.ini"
). If you're stuck having the actual config file reside in a location that's not the project root, that might help get you there.
In my humble opinion, having the active_only_if_file_found
respect the SPELL_VALE_CONFIG_FILE
parameter would be the best solution; however, if Megalinter doesn't currently do that -- regardless of how complicated the logic to support it may be -- I don't know if there would be a sufficient return on that investment.. then again, it's not my call.
Someone with more familiarity into that check works may be able to provide more insight.
Sorry... that's all I've got at the moment.
from megalinter.
Maybe we should remove that SPELL_VALE_CONFIG_FILE
parameter so as to reduce potential confusion. 🤷
from megalinter.
Thanks @wesley-dean-flexion for the quick response! That was my best guess as well - the config should be removed if not possible to make it work or maybe there is some clever solution by the megalinter team. Putting linter configs in a dedicated folder is a practice we are trying to follow for repo organization...putting all of our (mega)linter configs in the root of the repo would increase clutter but is doable if needed.
from megalinter.
@schorlton please can you check with MegaLinter beta version ?
Now if SPELL_VALE_CONFIG_FILE is defined, its value will be checked to define if the linter must be activated or not
from megalinter.
Related Issues (20)
- Issue in setting custom configuration files HOT 1
- Request new MegaLinter flavor HOT 1
- MegaLinter Azure DevOps Extension/Task HOT 6
- Unable to use ESLint flat config for linting JavaScript HOT 13
- Biome support HOT 3
- Update version of tflint-ruleset-aws HOT 3
- Doesn't seem to use LINTER_RULES_PATH in WSL HOT 4
- How does one configure Detekt? HOT 11
- Powershell installed twice HOT 3
- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension On Install HOT 2
- ENABLE_ERRORS_LINTERS HOT 3
- Powershell error table formatting issue HOT 1
- Devskim config ignored instead crawl-archives enabled by default HOT 1
- VSCODE error HOT 2
- Can EXTENDS be set in env? HOT 2
- TFLint - deprecated argument in ".tflint.hcl" HOT 6
- Action "Auto-Update Linters" is failing HOT 19
- Dependency "ip" needs to be replaced HOT 2
- Dependency Dashboard
- Add conftest integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from megalinter.