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

Idea - Scapegoat as a bot? #312

Open
mccartney opened this issue Mar 15, 2020 · 3 comments
Open

Idea - Scapegoat as a bot? #312

mccartney opened this issue Mar 15, 2020 · 3 comments

Comments

@mccartney
Copy link
Collaborator

I continue to be impressed about the concept and execution of @scala-steward. It automates the boring stuff and serves remediations in an undoubtedly convenient way for the project maintainers.

How about we have an opt-in Scapegoat Bot patrolling opensource Scala projects?

The only problem I see is that while upgrading dependencies hardly ever spurs controversies (Scala Steward), some of our inspections might be seen as questionable (Scapegoat).

What we would need as well is some mechanism for fixes (scalafix?), not only for flagging suspicious code as we do now.

@sksamuel
Copy link
Collaborator

sksamuel commented Mar 15, 2020 via email

@mwz
Copy link
Contributor

mwz commented Mar 15, 2020

I've been recently planning to implement a Scalastyle Github App which posts code issues back as inline PR comments (similar to the PR decoration feature which I implemented in sonar-scala here, but as a standalone Github App without the need for SonarQube.)

Scalastyle is a bit simpler to do because it doesn't need to compile your code, so it executes fairly quickly and you can easily run it on e.g. lambda on AWS for a fairly low cost even at a large scale. Scapegoat is a compiler plugin so the compilation stage makes it a bit more resource heavy + you need to execute it via sbt for each project, which adds a bit of security risk of potential arbitrary code execution that you need to protect yourself against - but it's definitely a great idea and it's definitely doable. (Scapegoat Github App was going to be next on my list 😃)

@sksamuel
Copy link
Collaborator

sksamuel commented May 2, 2020

If we were able to run scapegoat standalone, without the need for the scala compiler, then we could do this. Briefly looking over the ruleset, we don't need access to much that isn't syntactic, only, VarClosure and UnreachableCatch.

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

No branches or pull requests

3 participants