Skip to content
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

LINTER_RULES_PATH configuration does not work with Lychee #2866

Closed
andrewvaughan opened this issue Aug 7, 2023 · 2 comments
Closed

LINTER_RULES_PATH configuration does not work with Lychee #2866

andrewvaughan opened this issue Aug 7, 2023 · 2 comments
Labels
bug Something isn't working O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity

Comments

@andrewvaughan
Copy link
Contributor

Describe the bug
Regardless of how LINTER_RULES_PATH is configured in .mega-linter.yml, if the Lychee config files are not in the project root, both .lycheeignore and lychee.toml have no effect, even though Megalinter says they were found correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Place Lychee lint configurations in a directory called .config/linters
  2. Set LINTER_RULES_PATH: .config/linters in .mega-linter.yml
  3. Add megalinter\.io to .config/linters/.lycheeignore
  4. Run a Lychee-containing lint

Expected behavior
The megalinter.io links should be ignored, as configured. This is not the case, even though Megalinter says it has found the configuration files:

❌ Linted [SPELL] files with [lychee]: Found 3 error(s) - (151.08s)
- Using [lychee v0.13.0] https://megalinter.io/7.2.1/descriptors/spell_lychee
- MegaLinter key: [SPELL_LYCHEE]
- Rules config: [/.config/linters/lychee.toml]
- Ignore file: [/.config/linters/.lycheeignore]
- Number of files analyzed: [9]
--Error detail:
✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found
✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found
✗ [404] https://megalinter.io/flavors/ | Failed: Network error: Not Found
📝 Summary
---------------------
🔍 Total...........19
✅ Successful......16
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........3

Errors in .github/workflows/mega-linter.yml
✗ [404] https://megalinter.io/flavors/ | Failed: Network error: Not Found
✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found

Errors in .mega-linter.yml
✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found

These links are appropriately ignored if the files are placed in the project root, however:

✅ Linted [SPELL] files with [lychee] successfully - (150.74s)
- Using [lychee v0.13.0] https://megalinter.io/7.2.1/descriptors/spell_lychee
- MegaLinter key: [SPELL_LYCHEE]
- Rules config: [/lychee.toml]
- Ignore file: [/.lycheeignore]
- Number of files analyzed: [9]

It seems that lychee.toml has the same problem, as no configuration changes take effect unless the file is in the project root.

@nvuillam
Copy link
Member

@andrewvaughan that's very strange.... please can you run MegaLinter with LOG_LEVEL: DEBUG so the log will output the exact lychee CLI which is run, to check if the options are sent correctly ?

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Sep 21, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity
Projects
None yet
Development

No branches or pull requests

2 participants