You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Snakefmt seems to catch all issues and returns an error message. However, this message is too cryptic to be actionable. Take the error in this issue:
snakefmt.exceptions.InvalidPython: Got error:
'''
Cannot parse: 2:0: var = "anything really"
'''
while formatting code with black.
The MRE is 4 lines (of code, 7 lines total), the error message contains code from line 7, but mentions 2:0. Seems there is a miscalculation to the original line number.
Additionally, if I were formatting multiple files at once, it gets even harder to pinpoint where the error occurred.
I would suggest changing the exception error to the following message:
snakefmt.InvalidPython in file /path/to/file.smk. Cannot parse line 7:0: var = "anything really"
By stating filename and line number, users can find the issue more easily.
By changing from exception to message snakefmt would proceed with formatting other files. You could collect all warning messages until formatting is completed, then paste them all and exit with status 1.
The text was updated successfully, but these errors were encountered:
Hey team,
Here's a suggestion from a happy user!
Snakefmt seems to catch all issues and returns an error message. However, this message is too cryptic to be actionable. Take the error in this issue:
The MRE is 4 lines (of code, 7 lines total), the error message contains code from line 7, but mentions
2:0
. Seems there is a miscalculation to the original line number.Additionally, if I were formatting multiple files at once, it gets even harder to pinpoint where the error occurred.
I would suggest changing the exception error to the following message:
By stating filename and line number, users can find the issue more easily.
By changing from exception to message snakefmt would proceed with formatting other files. You could collect all warning messages until formatting is completed, then paste them all and exit with status 1.
The text was updated successfully, but these errors were encountered: