A GitHub App built with Probot and Scala.js that runs Scalafmt on your pull-requests and reports any problems with code formatting using GitHub Checks API.
This project is in active development, it's not ready for usage yet.
🤖Github bot for checking code formatting with scalafmt
Home Page: https://github.com/apps/scalafmt-probot
License: Mozilla Public License 2.0
A GitHub App built with Probot and Scala.js that runs Scalafmt on your pull-requests and reports any problems with code formatting using GitHub Checks API.
This project is in active development, it's not ready for usage yet.
The bot parses .scalafmt.conf
, but the check is run on the files contents, so the filters in project.excludeFilters
should be applied out to the list of files to check. (also project.includeFilters
?)
Here are some ideas for the possible actions:
.scalafmt.conf
, cancel the check and offer an action to add an empty configI think that interactiveness is great, but I don't like that it forces the user to give write permissions to all repos where they install this app.
Current simple implementation just lists all files in the repo (at a given commit) and checks their formatting. This may take a long time in big repos. So the plan is to check only the files changed in the PR (i.e. assuming that master
stays well-formatted).
master
).scalafmt.conf
is among changed files, we still need to (re)check all filesOn one hand Checks API provides some means to make detailed reports with comments on particular lines of sources. So when the formatting check fails, it could generate a diff and comment on the pieces of the mis-formatted code.
On the other hand I personally don't see much value in such detailed reports. I would prefer the check to fail on the first mis-formatted file and report immediately, so that the feedback would be quick. I think that in most cases you don't care what exactly was mis-formatted, you just forgot to do it and as soon as you got this reminder on GitHub, you can just run scalafmt
locally (in whatever preferred way) and fix it.
It could be a configuration option, but I would like to avoid a bot-specific configuration and even if there was one, I want to choose a sensible default.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.