Commit Graph

31 Commits

Author SHA1 Message Date
6d72003446 fix(lint): fix all sonarcloud detected issues (#279)
* fix(ci): replace broad permissions with specific scopes in workflows

Replace read-all/write-all with minimum required permission scopes
across all GitHub Actions workflows to follow the principle of least
privilege (SonarCloud rule githubactions:S8234).

* fix(shell): use [[ instead of [ for conditional tests

Replace single brackets with double brackets in bash conditional
expressions across 14 files (28 changes). All scripts use bash
shebangs so [[ is safe everywhere (SonarCloud rule shelldre:S7688).

* fix(shell): add explicit return statements to functions

Add return 0 as the last statement in ~46 shell functions across
17 files that previously relied on implicit return codes
(SonarCloud rule shelldre:S7682).

* fix(shell): assign positional parameters to local variables

Replace direct $1/$2/$3 usage with named local variables in _log(),
msg(), msg_err(), msg_done(), msg_run(), msg_ok(), and array_diff()
(SonarCloud rule shelldre:S7679).

* fix(python): replace dict() constructor with literal

Use {} instead of dict() for empty dictionary initialization
(SonarCloud rule python:S7498).

* fix(shell): fix husky shebang and tolerate npm outdated exit code

* docs(shell): add function docstring comments

* fix(shell): fix heredoc indentation in x-sonarcloud

* feat(python): add ruff linter and formatter configuration

* fix(ci): align megalinter config with biome, ruff, and shfmt settings

* fix(ci): disable black and yaml-prettier in megalinter config

* chore(ci): update ruff-pre-commit to v0.15.0 and fix hook name

* fix(scripts): check for .git dir before skipping clone in install-fonts

* fix(shell): address code review issues in scripts and shared.sh

- Guard wezterm show-keys failure in create-wezterm-keymaps.sh
- Stop masking git failures with return 0 in install-cheat-purebashbible.sh
- Add missing shared.sh source in install-xcode-cli-tools.sh
- Replace exit 1 with return 1 in sourced shared.sh

* fix(scripts): address code review and security findings

- Guard wezterm show-keys failure in create-wezterm-keymaps.sh
- Stop masking git failures with return 0 in install-cheat-purebashbible.sh
- Add missing shared.sh source in install-xcode-cli-tools.sh
- Replace exit 1 with return 1 in sourced shared.sh
- Remove shell=True subprocess calls in x-git-largest-files.py

* style(shell): apply shfmt formatting and add args to pre-commit hook

* fix(python): suppress bandit false positives in x-git-largest-files

* fix(python): add nosemgrep suppression for check_output call

* feat(format): add prettier for YAML formatting

Install prettier, add .prettierrc.json config (200-char width, 2-space
indent, LF endings), .prettierignore, yarn scripts (lint:prettier,
fix:prettier, format:yaml), and pre-commit hook scoped to YAML files.

* style(yaml): apply prettier formatting

* fix(scripts): address remaining code review findings

- Python: use list comprehension to filter empty strings instead of
  slicing off the last element
- create-wezterm-keymaps: write to temp file and mv for atomic updates
- install-xcode-cli-tools: fix shellcheck source directive path

* fix(python): sort imports alphabetically in x-git-largest-files

* fix(lint): disable PYTHON_ISORT in MegaLinter, ruff handles it

* chore(git): add __pycache__ to gitignore

* fix(python): rename ambiguous variable l to line (E741)

* style: remove trailing whitespace and blank lines

* style(fzf): apply shfmt formatting

* style(shell): apply shfmt formatting

* docs(plans): add design documents

* style(docs): add language specifier to fenced code block

* feat(lint): add markdown-table-formatter to dev tooling

Add markdown-table-formatter as a dev dependency with yarn scripts
(lint:md-table, fix:md-table) and a local pre-commit hook to
automatically format markdown tables on commit.
2026-02-07 19:01:02 +02:00
de773ad68f refactor(scripts): add set -euo pipefail to all installer scripts
Add strict error handling to all scripts:
- 13 scripts get `set -euo pipefail`
- install-macos-defaults.sh gets `set -uo pipefail` (without -e) because
  defaults write commands may fail on newer macOS versions
- install-cargo-packages.sh: also add missing source of shared.sh
2026-02-05 22:51:40 +02:00
e19120c45a refactor(scripts): inline cargo packages into install script
Move package list from config/asdf/cargo-packages into
install-cargo-packages.sh as a bash array and remove the
external file. Update documentation accordingly.
2026-02-04 03:22:17 +02:00
91cde60dba fix(scripts): resolve shellcheck warnings (#148) 2025-07-10 17:44:36 +03:00
6de8e92968 chore(scripts): update install-cargo-packages.sh 2025-02-25 20:25:01 +02:00
f4da515120 chore(scripts): refactor cargo and go pkg install 2025-02-23 17:23:54 +02:00
4daaa62aed feat(dfm): scripts/install-* to autocomplete, docs 2024-12-28 19:01:45 +02:00
a8a473a46d chore: shfmt, cleanup 2024-12-28 18:59:09 +02:00
4c4de2dc26 chore(config): tweaks to path, show script name 2024-09-25 14:48:59 +03:00
3fa90eef3b chore(bin): dfm, update install-* scripts 2024-09-15 17:46:42 +03:00
1f2ca90ca5 feat!: refactor base, config, dfm and scripts 2024-07-23 03:43:12 +03:00
adecceda7a chore(scripts): eval scripts/shared.sh 2024-07-17 10:04:16 +03:00
383bc2b052 chore(scripts): tweak cargo updates 2024-06-25 01:15:15 +03:00
13764775ca feat: switch from starship to oh-my-posh 2024-02-06 10:10:59 +02:00
7ce8c78920 fix(cargo): change cargo-clean to cargo-cache 2023-12-07 01:43:32 +02:00
71301a6436 feat(scripts): add cache clearing operations 2023-12-07 01:37:39 +02:00
d598aade16 chore(scripts): update cargo install script 2023-11-27 19:08:51 +02:00
6ae753d257 feat(cargo): added bottom 2023-11-13 09:28:37 +02:00
4699233d46 chore(shell): touching the paths again, no regrats 2023-11-13 09:25:58 +02:00
988cb9cd18 chore(shell): drop autoupdate-antigen plugin 2023-10-13 11:13:12 +03:00
39ecd0495c fix(shell): update paths, add missing deps 2023-09-29 20:46:46 +03:00
56ae0e1e1c feat(scripts): have is now x-have script 2023-09-29 14:51:20 +03:00
594ee0d03c chore(scripts): more work on installation scripts 2023-09-28 18:59:21 +03:00
fbdd2c7448 fix(shell): fixed zsh/bash config loading 2023-09-28 17:53:09 +03:00
3ac1fac444 feat(nvim): Switched from brew nvim to bob-nvim 2023-09-27 15:25:33 +03:00
a87b33b8c2 chore(shell): make everything bit faster 2023-09-27 10:38:10 +03:00
6f854ddbfd chore(lint): linting, tweaks, cleanup 2023-09-25 12:17:14 +03:00
748e5bb561 feat(dotbot): plugins: pipx, snap and crontab 2023-09-25 11:51:23 +03:00
c1dda8a230 feat(shell): eza, a modern replacement for ‘ls’ 2023-09-20 09:49:21 +03:00
b3445d7e7a feat(dfm): shfmt now run with cargo installed fd 2023-09-19 09:03:08 +03:00
a26f160326 feat(dfm): install rust/cargo packages 2023-09-19 02:22:05 +03:00