🔍 Git-based linter tool that scans code changes for compliance with defined rules in source code.
go get -u github.com/EthanThatOneKid/difflintdifflint --help# File: ./main.py#LINT.IFprint("Edit me first!")
#LINT.END bar#LINT.IF :barprint("Edit me second!")
#LINT.END# File ./foo.py#LINT.IFprint("Edit me first!")
#LINT.END bar# File: ./main.py#LINT.IF ./foo.py:barprint("Edit me second!")
#LINT.ENDIn programming languages lacking a comprehensive match statement for enumerations, our only option is to verify whether the switch statement aligns with the enumerated type.
//LINT.IFenumThing{ONE=1,TWO=2,}//LINT.END :thing_enum//LINT.IF :thing_enumswitch(thing){caseThing.ONE: {returndoThingOne();}caseThing.TWO: {returndoThingTwo();}}//LINT.ENDgit diff | difflint --ext_map="difflint.json"{
"yaml": ["#LINT.?"]
}Run the tool from source with the Go toolchain:
go run cli/main.go --helpCreated with 💖 by @EthanThatOneKid