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)
- Linter Pyright cannot import boto3 although I install it in PYTHON_PYRIGHT_PRE_COMMANDS HOT 4
- Possible futur issue with MarkdownLint HOT 4
- Proselint does not work as of 7.8.0 HOT 3
- Xmllint: also lint xsd files HOT 2
- Request new MegaLinter flavor HOT 1
- Semgrep status in documentation HOT 1
- Using apt-get in PRE_COMMANDS HOT 9
- Megalinter doesn't update the ts files with prettier ( doesn't format them ) HOT 5
- Request new MegaLinter flavor HOT 1
- Support AsyncAPI linting using Spectral HOT 7
- Explore installing Python with astral's `uv` HOT 6
- Kics incorrectly reporting the number of errors in summary HOT 2
- Line numbers reported by linters do not correspond to the committed files HOT 9
- Can we use _extends from another repo in same org HOT 20
- APPLY_FIX related steps are not executing HOT 7
- βenv VALIDATE_ALL_CODEBASE=false does not work in docker HOT 12
- Megalinter is very slow HOT 11
- Typescript with invalid interface loaded as resolver HOT 4
- ANSIBLE_LINT enablement in Megalinter configurations is not checking the ansible yaml validations. HOT 11
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.