megalinter
megalinter copied to clipboard
Salesforce SFDX CLI Update message confuses the regex parser
Describe the bug We're trying to run the Salesforce SFDX linter suite and it looks like it's failing because the megalinter parser tries to parse the update warning from sfdx-cli. (We expect to see one issue with the code but it returns nothing but the green check)
The exact error message: Unable to extract version with regex re.compile('(?<=@salesforce/sfdx-scanner )\\d+(\\.\\d+)+') from › Warning: sfdx-cli update available from 7.144.2 to 7.145.0.
To Reproduce Steps to reproduce the behavior:
- Go to megalinter results
- Click on logs
- Scroll down to
SALESFORCE_SFDX_SCANNER_AURA
results - See error
no plugins installed
(screenshot attached)
Expected behavior
Either the parsing should ignore the sfdx-cli
update message, or the sfdx update
command should be run each time to ensure we're on the latest version.
The parsing code seems to be here: https://github.com/megalinter/megalinter/blob/main/megalinter/Linter.py#L715
Screenshots
Added screenshot of the error
Additional context We think this is the root issue, but happy to be wrong :)
I'm seeing a similar issue. I have attached the log files from the resulting run. mega-linter.log SUCCESS-SALESFORCE_SFDX_SCANNER_APEX.log SUCCESS-SALESFORCE_SFDX_SCANNER_AURA.log SUCCESS-SALESFORCE_SFDX_SCANNER_LWC.log
According to your logs, the issue is more than sfdx-scanner is not installed than the not retrievable version :/
What version of MegaLinter are you using ?
I tried both the beta & v5 version. It seems like it's happening for both of the versions.
I'm currently stucked on git safe.directory hell https://github.com/megalinter/megalinter/issues/1416 but i'll try to look on this issue later if someone does not find a solution before :)
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.
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.
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.
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.