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

Add static analysis tools for PRs #672

Open
George3d6 opened this issue Oct 22, 2021 · 12 comments
Open

Add static analysis tools for PRs #672

George3d6 opened this issue Oct 22, 2021 · 12 comments
Assignees
Labels
good first issue Good for newcomers hacktoberfest Contirubte to Lightwood and participate in Hacktoberfest. help wanted Extra attention is needed test Adding or modifying some tests or testing-methodology

Comments

@George3d6
Copy link
Contributor

George3d6 commented Oct 22, 2021

We need to add a static analysis tool that triggers on each PR and provides a report, ideally flake8 style where we can configure its behaviour and have the action fail until the PR respects all imposed rules. The "configure behaviour" bit is important since we might have some standards that are not in line with static analysis preferences (e.g. there's certain bits where we use exec and eval or where we must use * imports and so forth)

Multiple people can tackle this one, since the ore tools the merrier as long as they catch actual errors, ideally also fix the errors detected as part of the PR if it's easy enough. However if the tool catch more than 5-10 errors then don't bother, just make the PR, since we might think those are not actual errors and will want to configure them away.

Currently, I use pylance and find it amazing for this, but am open to any tool

@George3d6 George3d6 added good first issue Good for newcomers test Adding or modifying some tests or testing-methodology hacktoberfest Contirubte to Lightwood and participate in Hacktoberfest. labels Oct 22, 2021
@George3d6 George3d6 changed the title Add stati analysis tools for PRs Add static analysis tools for PRs Oct 22, 2021
@vickywane
Copy link

Hi @George3d6 ,

I would love to introduce Pyright. It's an opensource alternative for your Pylance.

Since Pylance has similar features of Pyright, would it be worth it including both?

@George3d6
Copy link
Contributor Author

I was unaware pylance was closed sourced O.O

But yes, please go ahead and introduce it, given that it's made by Microsoft I assume it might be intended to replace pylance in VSC anyway.

1 similar comment
@George3d6
Copy link
Contributor Author

I was unaware pylance was closed sourced O.O

But yes, please go ahead and introduce it, given that it's made by Microsoft I assume it might be intended to replace pylance in VSC anyway.

@vickywane
Copy link

@George3d6 I just discovered Prospector which i think is an amazing tool.

It is recommended to use Pylance by installing it in VSC so i don't think there's any need to manually configure it here.

I'll push a PR now with Prospector.

@vickywane
Copy link

@George3d6 I've opened a PR for this here.

@George3d6 George3d6 removed the hacktoberfest Contirubte to Lightwood and participate in Hacktoberfest. label Nov 2, 2021
@George3d6
Copy link
Contributor Author

Hacktoberfest is over :( But if you want to finish the PR (@vickywane )and/or if anyone else wants to work on this, it's still something we'd very much like

@George3d6 George3d6 added the help wanted Extra attention is needed label Nov 2, 2021
@vickywane
Copy link

@George3d6 I really would like to finish my work on introducing Prospector here but the issue I faced was that Prospector was not outputting the logs in the Github CI Run.

I dont know if it’s the way stdio is handled within your GitHub CI but locally the same tool prints out the analysis result. I will however try a few more times to see if i can figure it out.

@paxcema paxcema added the hacktoberfest Contirubte to Lightwood and participate in Hacktoberfest. label Oct 4, 2022
@paxcema
Copy link
Contributor

paxcema commented Oct 4, 2022

Bumping for this year's Hacktoberfest! Anyone interested feel free to give this a try.

@vickywane
Copy link

I'll give this a shot

@vickywane
Copy link

@paxcema I have gotten Prospector set up within this pull request.

I think we can proceed further to configure its behavior.

Cc: @George3d6

@chandrevdw31
Copy link

@vickywane any progress on the updates in the pr?

@vickywane
Copy link

Nothing yet as I didn't get feedback from the reviewers.

I'll be glad to dedicate some time to work on this next week.

Considering that Hacktoberfest is over, will there be any incentive for working on this? 🌚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Contirubte to Lightwood and participate in Hacktoberfest. help wanted Extra attention is needed test Adding or modifying some tests or testing-methodology
Projects
None yet
Development

No branches or pull requests

4 participants