-
Notifications
You must be signed in to change notification settings - Fork 29
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 not working correctly #37
Comments
I had the same issue. The problem is that the pushed fix from closed issue #36 is not in the Package Control version of SublimeFortran. You can download the new |
@ctowery Edit: With SublimeLinter's debug mode it was fairly easy to locate the issue: The current regex is: r'^[^:]*:(?P<line>\d+)[:.](?P<col>\d+):' Given that windows paths include a colon class GfortranModern(Linter):
"""Provides an interface to gfortran."""
syntax = 'fortranmodern'
cmd = 'gfortran -cpp -fsyntax-only -Wall'
executable = None
version_args = '--version'
version_re = r'(?P<version>\d+\.\d+\.\d+)'
version_requirement = '>= 4.0'
multiline = True
if (sys.platform == 'win32'):
regex = (
# filename:line:col: is common for multiline and single line warnings
r'^.*:(?P<line>\d+)[:.](?P<col>\d+):'
# Then we either have a space or (a newline, a newline, some source code, a newline, a col number, a newline)
r'(?:\s|$\r?\n^$\r?\n^.*$\r?\n^\s*\d$\r?\n)'
# Finally we have (Error|Warning): message to the end of the line
r'(?:(?P<error>Error|Fatal\sError)|(?P<warning>Warning)): (?P<message>.*$)'
)
else:
regex = (
# filename:line:col: is common for multiline and single line warnings
r'^[^:]*:(?P<line>\d+)[:.](?P<col>\d+):'
# Then we either have a space or (a newline, a newline, some source code, a newline, a col number, a newline)
r'(?:\s|$\r?\n^$\r?\n^.*$\r?\n^\s*\d$\r?\n)'
# Finally we have (Error|Warning): message to the end of the line
r'(?:(?P<error>Error|Fatal\sError)|(?P<warning>Warning)): (?P<message>.*$)'
)
tempfile_suffix = "f90"
on_stderr = True Another option might be replacing the P.S. I could submit a PR(See below). |
I'm having the same problem. Inline linter using gfortran has not worked in a while. You can read more at Package SublimeFortran not fully functional after build 3143?. As of right now, the package does not even appear under Package Control > Install Package. I've also tried the manual installation, which did not resolve the issue. Please note that I'm using a Linux system. |
Interestingly, status bar does show
gfortranmodern(errer)
on error andgfortranmodern(ok)
when everything is okay.Sublime's console shows linter messages as well.
Package installed from Package control.
Sublime 3 build 3143
The text was updated successfully, but these errors were encountered: