-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
PRE / POST commands at descriptor level #3450
Comments
@bdovaz that's a good proposition :) Would you like to make the PR ? It should be something like adding methods run_descriptor_pre_commands(descriptor_id) and run_descriptor_post_commands(descriptor_id) and call them from the appropriate places |
@nvuillam I am looking at it but I have a doubt. That is where the linters are processed: megalinter/megalinter/MegaLinter.py Line 234 in 83cefd4
What contains "active_linters" are only the ones that are going to be executed? I mean, if I have in my repo only *.py files and I haven't activated/deactivated any linter in the .megalinter.yml configuration, in that list I will only get the linters that process *.py extensions? Because I only need those that are going to be executed (not the total) to be able to extract from them the "descriptor_id" and from there to make the call to the pre and post of each descriptor in case it is established. |
Right now they can only be created at the global or linter level, but not at the descriptor level:
https://megalinter.io/latest/descriptors/php/
Example: I want to run
composer install
for all PHP linters but I only want this command to run if it finds*.php
files and not always run it even if there are no php files in the analysis what would happen if I do it with the commands globally.The text was updated successfully, but these errors were encountered: