juped / git-lint-branch Goto Github PK
View Code? Open in Web Editor NEWa linter for git branch histories
License: ISC License
a linter for git branch histories
License: ISC License
The skeleton project currently opens a git repository in the current directory. Real git commands work from anywhere in a repository's work tree (and the ones that don't involve work trees work from anywhere in the repository too). See if pygit2 has a mechanism to do this first (I think it does); if not, write a simple one.
Multi-commit linters are tougher than single-commit linters. I think they should get a fresh copy of the pygit2 walker and use it and/or the commit objects themselves to walk the log in their own style. However, it's possible that we might need more involved operations and data models. This requires some design forethought.
I'm thinking .git-lint-branch
in the repository root (or a similar name) is good. Should be INI or TOML to match more or less closely with .gitconfig
's format. This should be able to specify linters to run, options to linters that support them, and what warning level to apply to each linter.
With multiple linters producing output per commit, the output becomes hard to read.
--no-verbose
or similar option should silence help messages.Maybe we should make a disconnected commit graph in the repository with a fake project history with some messy branches to test our linters against.
Part of the output of a linter should be the warning level: we can provide defaults in the linter, overridable by .git-lint-branch
files. Maybe the following:
These should be the easiest to represent - linters that only look at a single commit. In the overall program flow, we should walk the commits once and check each one with all single-commit linters, then later each multi-commit linter can walk the branch in its own way individually. What we need is some kind of function or class interface that takes a pygit2 commit object and returns a lint result.
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.