Skip to content

Commit 4b7e6df

Browse files
authored
Merge pull request #412 from ehuss/clippy-target
Allow target detection with Clippy.
2 parents a2e1a3d + b17c06f commit 4b7e6df

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

SyntaxCheckPlugin.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,22 +144,12 @@ def get_rustc_messages(self):
144144
settings.load()
145145
command_info = cargo_settings.CARGO_COMMANDS[method]
146146

147-
if method == 'clippy':
148-
# Clippy does not support cargo target filters, must be run for
149-
# all targets.
150-
cmd = settings.get_command(method, command_info, self.cwd,
151-
self.cwd, force_json=True)
152-
self.msg_rel_path = cmd['msg_rel_path']
153-
p = rust_proc.RustProc()
154-
p.run(self.window, cmd['command'], self.cwd, self, env=cmd['env'])
155-
return p.wait()
156-
157147
if method == 'no-trans':
158148
print('rust_syntax_checking_method == "no-trans" is no longer supported.')
159149
print('Please change the config setting to "check".')
160150
method = 'check'
161151

162-
if method != 'check':
152+
if method not in ['check', 'clippy']:
163153
print('Unknown setting for `rust_syntax_checking_method`: %r' % (method,))
164154
return -1
165155

rust/cargo_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
'clippy': {
9494
'name': 'Clippy',
9595
'command': 'clippy',
96-
'allows_target': False,
96+
'allows_target': True,
9797
'allows_target_triple': True,
9898
'allows_release': True,
9999
'allows_features': True,

0 commit comments

Comments
 (0)