Skip to content

mmazurowski/srclint-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

srclint - source code consistency helper

Goal of this project is to keep consistent and concise codebase spread across many repositories.

Philosophy:

  1. Define required files (such as dependency locks, test runner configs, etc)
  2. Define shape of source code by convenient yaml notation
  3. Ignore directories that hold no value for consistency (docs, assets, misc)
  4. Run in CI/CD to make sure your changes comply with expected standard

When binary is executed it should produce output similar to the following

Run result example


How to use

srclint .

How it works:

Each directory needs to have config file in working directory for the program. Basic config looks like this:

version: 1
required:
  - "srclint.yml"
structure:
  - "src/**" 
ignore:
  - ".idea"

Error Codes

  1. Missing required file
  2. Source code structure failed validation

Roadmap:

  1. Detect errors and suggest change based on string similarity between allowed and failing paths.
  2. Add --fix command to handle case from #1

About

Source code structure linter. (WIP)

Topics

Resources

Stars

Watchers

Forks