Skip to content
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

[Feature Request] Support for warnings #10

Open
YonatanAhituv opened this issue Apr 8, 2018 · 9 comments
Open

[Feature Request] Support for warnings #10

YonatanAhituv opened this issue Apr 8, 2018 · 9 comments

Comments

@YonatanAhituv
Copy link

Currently, there is no differentiating between errors and warnings from pyflakes, however
Atom's pyflakes linter managed to detected warnings from errors by looking for the following strings:

'used',
'redefines',
'shadowed'
'may be'

in the output. Maybe something like that could be integrated.

@kaste
Copy link
Contributor

kaste commented Apr 8, 2018

That sounds like a good addition. Can you make a PR? If you don't know how to start just ask, I can guide you through.

@YonatanAhituv
Copy link
Author

YonatanAhituv commented Apr 9, 2018

@kaste I tried, but the documentation isn't good, and I haven't done any work with regex. Really sorry.

@kaste
Copy link
Contributor

kaste commented Apr 9, 2018

Basically you have to implement split_match

	def split_match(self, match):
		match, line, col, error, warning, message, near = super().split_match(match)
		if not match:
			return None

		# now parse and interpret 'message'
		# 'error' or 'warning' represent a 'code' or linter rule like 'W031' or 
		# '(no-redef)' etc. 
		if message is an error:
			error = 'error'
		else:
			warning = 'warning'
		return match, line, col, error, warning, message, near

@YonatanAhituv

This comment has been minimized.

@kaste

This comment has been minimized.

@YonatanAhituv

This comment has been minimized.

@kaste

This comment has been minimized.

@YonatanAhituv

This comment has been minimized.

@gorkicode
Copy link

Currently, there is no differentiating between errors and warnings from pyflakes, however Atom's pyflakes linter managed to detected warnings from errors by looking for the following strings:

'used',
'redefines',
'shadowed'
'may be'

in the output. Maybe something like that could be integrated.

Hi! :) take a look at #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants