Skip to content

Commit

Permalink
feat(doc): #30 use lint bash
Browse files Browse the repository at this point in the history
- Use lint bash instead of format python
due to performance
  • Loading branch information
dsalaza4 committed Jan 21, 2023
1 parent 5da7c08 commit af33747
Showing 1 changed file with 27 additions and 31 deletions.
58 changes: 27 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,60 +255,56 @@ Let's review one of the builtins used:

```nix
{
formatPython = {
lintBash = {
enable = true;
targets = ["/"];
};
}
```

The [formatPython](https://github.com/fluidattacks/makes#formatpython) builtin
formats all files
with `.py` extension within the specified path `/`.
The [lintBash](https://github.com/fluidattacks/makes#lintbash) builtin
lints all `bash` files
within the specified path `/`.

Let's try running it!

```bash
$ m github:fluidattacks/makes-example@main /formatPython
$ m github:fluidattacks/makes-example@main /lintBash
πŸ¦„ Makes
v22.11-linux
πŸ¦„ Makes
v22.11-linux
────────── Fetching github:fluidattacks/makes-example@main ──────────
────────── Fetching github:fluidattacks/makes-example@main ───────────
Initialized empty Git repository in /tmp/makes-rbqvoewj/.git/
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 26 (delta 1), reused 20 (delta 0), pack-reused 0
Unpacking objects: 100% (26/26), 9.05 KiB | 713.00 KiB/s, done.
From https://github.com/fluidattacks/makes-example
Initialized empty Git repository in /tmp/makes-a7nxrsao/.git/
Cached from /home/nixos/.makes/cache/sources/github-fluidattacks-makes-example-main
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 33 (delta 1), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (33/33), 54.52 KiB | 9.09 MiB/s, done.
From /home/nixos/.makes/cache/sources/github-fluidattacks-makes-example-main
* [new branch] main -> main
Switched to branch 'main'
────────────────── Building project configuration ───────────────────
/nix/store/2mnjjd4gkzrbyr7g97yl19n2y4zv0hi3-config.json
────────────────────── Building /formatPython ───────────────────────
─────────────────── Building project configuration ───────────────────
/nix/store/sdxndxx6b2i7427m34x9b2jys748l6kv-format-python
/nix/store/1z12m8gfyp0wsc9wx9b01vxfci9872hp-config.json
────────────────────────────── Running ──────────────────────────────
───────────────────────── Building /lintBash ─────────────────────────
All done! ✨ 🍰 ✨
2 files left unchanged.
Skipped 1 files
/nix/store/6nkq7ykmn6l177zri1hh9wdng1q0468x-lint-bash
───────────────────────────── Provenance ─────────────────────────────
Attestation: /home/nixos/.makes/provenance-lintBash.json
SHA-256: 427e69ed2e200ec82cd9bf33fa015d4afa40480020db1cd6a6ea47b91b996147
──────────────────────────── πŸ„ Success! ────────────────────────────
──────────────────────────── πŸ€™ Success! ─────────────────────────────
```

It temporarily clones the provided repository
and then executes the job that exists within it.
While executing `/formatPython`,
it finds two files,
specifically the ones contained in `api/src`,
and validates if they are properly formatted.
and then executes `/lintBash` within it,
granting compliance with good practices
in all `bash` files.

## Working with a Nixpkgs version

Expand Down

0 comments on commit af33747

Please sign in to comment.