Commit Graph

104 Commits

Author SHA1 Message Date
88eceaf194 fix(dfm): restrict cheat-databases glob to .sh files only
The install-cheat-* glob was matching .md documentation files, causing
errors when bash tried to execute them.
2026-02-07 22:45:08 +02:00
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
abb6c9f615 refactor(dfm): clean up portability, dead code, and error handling
Add bash 4.0+ version check with macOS Homebrew bootstrap. Remove
unreachable fish shell detection and source_file function. Fix bugs:
remove dead ntfy menu entry, fix msg/msgr case mismatch in tests,
guard shift calls against empty args, quote $width, fix $"..." locale
string, fix exit 0 on apt error. Replace declare -A with indexed
array in section_scripts. Use early-return guards with msgr warn for
unavailable brew/apt. Replace exit with return in section functions.
2026-02-05 22:07:03 +02:00
959e7c418e chore: remove 15 unused config directories and stale references
Drop config folders (aerospace, aqua, asdf, direnv, flipperdevices,
ghostty, htop, misc, nano, task, tealdeer, tms, wtf, yamlfmt,
yamllint) along with starship.toml, nbrc, and aerospace scripts/docs.

Clean up references in dfm, _dfm completions, bashrc, exports, and
exports-lakka to match.
2026-02-04 08:05:37 +02:00
961efec364 feat: switch to biome, apply formatting, shellcheck (#227)
* feat: switch to biome, apply formatting, shellcheck
* chore: apply cr comments
* chore: few config tweaks, shellcheck hook now py-based
* chore: lint fixes and pr comments
* chore(lint): megalinter, and other fixes

Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-12-17 16:03:29 +02:00
c9f1e824c3 chore(bin): fish support shared.sh and dfm 2025-05-03 02:32:01 +03:00
b8f0bb570e fix(bin): dfm install all 2025-03-18 00:13:34 +02:00
4f2b47d5c3 feat(asdf): removal of asdf
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-02-25 10:41:20 +02:00
7525f1f71d feat(dfm): dfm apt helper commands 2025-01-16 16:19:45 +02:00
1288599b1f feat(docs): aerospace keybindings and update code 2025-01-15 15:33:01 +02:00
23430a609a chore(bin): dfm cleanup, tweaks 2025-01-14 06:59:36 +02:00
f8a317f3c7 chore(dfm): install script cleanup 2025-01-02 15:18:48 +02:00
e22094e0da fix(dfm): asdf plugin-install, docs translations 2024-12-30 11:26:54 +02:00
a8a473a46d chore: shfmt, cleanup 2024-12-28 18:59:09 +02:00
eb91a43bbd feat(asdf): drop asdf-plugin-manager, use dotbot-asdf 2024-12-28 16:58:31 +02:00
3fb0a75a62 feat(asdf): update automation, versions, plugins 2024-12-24 00:59:50 +02:00
43dcb303a0 chore(dfm): improved colors helper 2024-12-16 08:25:29 +02:00
b5a3c34fc3 chore(lint): dfm lints 2024-12-05 21:23:48 +02:00
900e6a8f85 chore(shell): cleanup and antidote plugins 2024-11-25 13:54:14 +02:00
7ff74f0e15 feat(dfm): add asdf helpers 2024-11-08 15:36:47 +02:00
9d1f62fcca feat(dfm): more helpers, enable multiple commands 2024-11-08 15:35:56 +02:00
e2c37d29e8 chore: more cleanup, linting and fixes 2024-09-19 12:40:16 +03:00
81e9b20eb6 chore(config): cleanup and removal of duplicates 2024-09-19 09:49:35 +03:00
3fa90eef3b chore(bin): dfm, update install-* scripts 2024-09-15 17:46:42 +03:00
8d85809b1c fix(dfm): asdf install parameter + asdf updates 2024-09-05 10:36:10 +03:00
bc4e906ff6 chore(dfm): check for fd and shfmt 2024-08-10 13:05:38 +03:00
e7cda5ac0c feat: wezterm config and docs generator 2024-08-10 13:02:41 +03:00
26f6024292 feat(bin): update scripts to function format 2024-07-23 03:45:22 +03:00
1f2ca90ca5 feat!: refactor base, config, dfm and scripts 2024-07-23 03:43:12 +03:00
9857c8eb00 feat(asdf): move rust to asdf 2024-07-17 09:41:41 +03:00
77f89c0f48 feat(asdf): manage go packages with asdf 2024-07-16 23:01:38 +03:00
Ismo Vuorinen
d93bc7aae3 feat(asdf): asdf and configuration (#19)
* chore(shell): configuration tweaks
* feat(asdf): add asdf, settings & most of the deps
2024-07-06 20:19:15 +03:00
c083d2a20a feat(dfm): Add brew leaves and clean commands 2024-04-08 02:51:32 +03:00
8f3f4d7ed9 chore(brew): update brewfile, add env to skip mas 2024-03-09 10:21:05 +02:00
13764775ca feat: switch from starship to oh-my-posh 2024-02-06 10:10:59 +02:00
e4f925e5b0 fix(dfm): base/* files not reverted 2023-12-07 01:37:00 +02:00
f392938e9e fix(dfm): have to x-have 2023-11-13 12:44:28 +02:00
88894a33a5 feat(dfm): install latest lts node with nvm-latest 2023-11-07 07:20:02 +02:00
1a74cf78c1 chore(dfm): added messages to each install command 2023-10-19 13:28:59 +03:00
e31948dcc5 feat(shell): oh-my-bash for bash 2023-10-19 13:27:41 +03:00
e6f3aae287 fix(shell): rework shell config for more stability 2023-10-02 08:39:07 +03:00
b1a7932b72 chore(scripts): tweaks to dfm and msgr 2023-09-28 22:39:25 +03:00
fbdd2c7448 fix(shell): fixed zsh/bash config loading 2023-09-28 17:53:09 +03:00
0aff4784b1 feat(scripts): msgr helper script 2023-09-28 17:13:44 +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
f5b1bf0915 feat(dfm): install nerdfonts 2023-09-24 23:46:09 +03:00
b3445d7e7a feat(dfm): shfmt now run with cargo installed fd 2023-09-19 09:03:08 +03:00
d61f53196d feat(dfm): install pip/python packages 2023-09-19 08:47:45 +03:00
a26f160326 feat(dfm): install rust/cargo packages 2023-09-19 02:22:05 +03:00