After installing the plugins, I first tried the Linter for AutoIT, which request the path to Au3Check.exe.
I think I found the correct file to edit:
D:\SyMenu\ProgramFiles\SPSSuite\SyMenuSuite\CudaText_(x64)_sps\py\cuda_lint_autoit\linter.py
The current code for this appears to be:
Code: Select all
cmd = 'Au3Check -q -I'
Code: Select all
cmd = '"D:\SyMenu - Other\ProgramFiles\MyApps\X-SciTE4AutoIt3\Bin\3.3.16.1\Au3Check.exe" -q -I'
I then opened the bottom panel and found that I am getting errors:
Code: Select all
ERROR: Cannot find data: D:\SyMenu\ProgramFiles\SPSSuite\SyMenuSuite\CudaText_(x64)_sps\data\toolbaricons\Fugue_16x16
Python 3.8.19
Init: cuda_config_toolbar
Loading toolbar config (0ms)
Init: cuda_lint
Init: cuda_project_man
ERROR: autoit cannot locate "D:\SyMenu - Other\ProgramFiles\MyApps\X-SciTE4AutoIt3\Bin.3.16.1\Au3Check.exe"
ERROR: autoit cannot locate "D:\SyMenu - Other\ProgramFiles\MyApps\X-SciTE4AutoIt3\Bin.3.16.1\Au3Check.exe"
Loaded session: "history session.json", 90ms, 8 file(s)
Now, about the path to Au3Check.exe...
Why is the path missing two characters? It should be:
D:\SyMenu - Other\ProgramFiles\MyApps\X-SciTE4AutoIt3\Bin\3.3.16.1\Au3Check.exe
But I am getting:
D:\SyMenu - Other\ProgramFiles\MyApps\X-SciTE4AutoIt3\Bin.3.16.1\Au3Check.exe
Notice that after the folder 'Bin' I am missing '\3' in the file path for some reason, even though it is specified in the linter.py!
Here is the full code of that linter:
Code: Select all
"""This module exports the AutoIt plugin class."""
from cuda_lint import Linter, util
import os
class AutoIt(Linter):
"""Provides an interface to Au3Check.exe."""
cmd = '"D:\SyMenu - Other\ProgramFiles\MyApps\X-SciTE4AutoIt3\Bin\3.3.16.1\Au3Check.exe" -q -I'
syntax = 'AutoIt'
tempfile_suffix = 'au3'
# "D:\Test\File.au3"(38,5) : error: asda(): undefined function.
regex = r'"(?P<match>.*)"\((?P<line>\d+),(?P<col>\d+)\)\s:\s(?P<type>.*?):\s(?P<message>.*)'
error_stream = util.STREAM_STDOUT
def split_match(self, match):
"""Return the components of the error."""
split_match = super(AutoIt, self).split_match(match)
match, line, col, error, warning, message, near = split_match
message = '{} (Col {})'.format(message, col)
if match and match.group('type') == 'error':
error = 1
message = 'Error: ' + message
elif match and match.group('type') == 'warning':
warning = 1
message = 'Warning: ' + message
return match, line, col, error, warning, message, ''
def run(self, cmd, code):
"""Overwrite linter function for adding include dir parameter."""
cmd.append(os.path.dirname(self.filename))
return self.tmpfile(cmd, code, suffix=self.get_tempfile_suffix())
I am also getting problems with the other AutoIT plugins, but I'll get this sorted first.
Thanks for your help.