0.6.0 • Published 11 months ago

autofix v0.6.0

Weekly downloads
13
License
MIT
Repository
github
Last release
11 months ago

Autofix

Gitpod Ready-to-Code NPM version

Automatically fix all software bugs.

Examples

Automatically fix bugs in the current directory:

autofix

Preview all the commands this would run, but don't actually do anything:

autofix --dry

Autofix bugs, commit fixes into separate branches, push branches to a GitHub remote:

autofix --branches --push=myremote

Autofix bugs in a GitHub repository:

autofix https://github.com/nodejs/node

Autofix bugs in a GitHub repository, commit fixes, and automatically send pull requests (requires hub):

autofix https://github.com/nodejs/node --pull-request

Try it online

Open in Gitpod

Try it locally

If you have npm, you can run autofix via npx:

npx autofix

Command line options

autofix (DIRECTORY|REPOSITORY) [OPTIONS]
  • DIRECTORY: Run autofix in a particular directory (defaults to .).
  • REPOSITORY: Clone a Git repository, then run autofix in it.

OPTIONS:

  • --dry: Simulate without actually running any fix commands
  • --branches: Commit fixes of different types into different branches (e.g. autofix-codespell)
  • --tiers=0,1,2: Choose which types of bugs should be autofixed (see details about tiers below)
  • --verbose: Log additional information to the console (e.g. for troubleshooting autofix bugs)
  • --push=REMOTE: Push fixes to a given GitHub remote (e.g. your GitHub username)
  • --pull-request: Automatically open pull requests with pushed commits (requires hub, implies --push=origin if unspecified)
  • --pull-request-description=FILENAME: Customize pull request descriptions by providing a markdown file (use with --pull-request)
  • --branch-suffix=SUFFIX: Add a common suffix to generated branch names (i.e. autofix-codespell-SUFFIX)
  • --signoff: Use Git's --signoff (or -s) feature when creating commits

Types of bugs that can be fixed

Tier 0 (default - no rework needed):

  • Remove trailing whitespace (uses git, xargs and sed)
  • Update pinned pyenv tool versions in Dockerfiles (requires pyenv)
  • Update pinned nvm tool versions in Dockerfiles (requires nvm)
  • Update pinned sdkman tool versions in Dockerfiles (requires sdkman)
  • Update pinned rr versions in Dockerfiles
  • Update some pinned Go module versions in Dockerfiles
  • Update Git submodules

Tier 1 (some rework might be needed):

  • Fix typos & spelling mistakes (requires codespell)

Tier 2 (experimental, use with caution):

Tier 3 (you probably don't want to run these):

  • TODO

Custom fixers

You can also implement your own fixers (similar to the ones found in the ./fixers/ directory) and commit them to your repository under a .autofix/fixers/ directory. Autofix will automatically pick them up; run them on your codebase; and commit new fixes when relevant.

0.5.9

11 months ago

0.6.0

11 months ago

0.5.8

2 years ago

0.5.7

2 years ago

0.4.8

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

4 years ago

0.3.9

4 years ago

0.3.10

4 years ago

0.4.0

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.2

5 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago