Commit Graph

23 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
bb93200f52 chore(cleanup): remove hosts/v
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-09-30 09:29:31 +03:00
25831458aa chore: fix git configs
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-08-28 11:22:22 +03:00
cf7ca2109f feat: add bats tests, docs (#139)
* fix(test): ensure bats file list uses xargs

* docs(readme): use yarn for testing instructions

* fix(test): ensure pipelines fail properly

* docs(alias): fix table header

---------

Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-06-30 04:30:06 +03:00
57c4f0438e chore: work computer setup, gitprofile update 2025-02-17 10:53:57 +02:00
f6e7590118 chore(hosts): remove ref to non-existent Brewfile 2025-01-08 03:35:15 +02:00
74fb12f093 chore(lint): tweaks, few pre-commit hook fixes 2024-12-10 09:11:12 +02:00
8a3b2e703c feat(hosts): air wallpaper 2024-07-17 09:43:41 +03:00
8b55ac1bba chore(lint): added yaml doc start lines, spelling 2023-12-31 01:02:44 +02:00
14270093c2 chore(config): remove irssi default theme 2023-10-02 11:58:45 +03:00
0c8b075689 fix(config): lakka zshrc fixes 2023-09-28 18:33:29 +03:00
1d056988f4 feat(lint): added my linting configs 2023-09-27 14:25:53 +03:00
5364bef678 fix(dotbot): git host overrides, nvm default pkgs 2023-09-25 08:28:11 +03:00
2f917c9285 chore(shell): documentation, cleanup 2023-09-08 00:34:51 +03:00
51afab44ef fix(shell): add missing hostname to config loaders 2023-08-31 09:56:26 +03:00
8d2083be4c fix(config): moved ssh gpg config from shared 2023-07-23 17:18:03 +03:00
2e963fa29e Feat(config): Deduplicate git config, add special 2023-05-15 15:49:10 +03:00
b688ee7503 Chore(tools): Moved dotbot under tools 2023-05-08 12:16:45 +03:00
5e59893281 DRY, codestyle, z installation, misc 2023-04-02 23:21:49 +03:00
d2cedd0fee Host specific files should now work 2023-04-02 04:17:15 +03:00
995cc569e7 Moved exports to config/exports, fixed codestyles 2023-04-02 03:56:51 +03:00
Ismo Vuorinen
fa3dc531a0 Tweaks & EOL's added 2023-03-27 10:01:02 +03:00
c9bc6e597a host-* to hosts/*, dfm rework, renaming and stuff 2023-03-17 13:37:58 +02:00