6 Commits
Author SHA1 Message Date
df2e64ead1 refactor(fsext): improve hierarchical ignore handling and consolidate file exclusion logic (#999)
* refactor(fsext): improve hierarchical ignore handling and consolidate file exclusion logic

- Refactor FastGlobWalker to use directoryLister for consistent ignore handling
- Add ShouldExcludeFile function for unified file exclusion checking
- Add WalkDirectories function for directory traversal with ignore support
- Improve directory pattern matching by checking both with and without trailing slash
- Add comprehensive tests for hierarchical ignore behavior and common patterns
- Remove direct dependency on go-gitignore in favor of existing directoryLister implementation

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>

* fix: improvements

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: t.Context()

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Crush <crush@charm.land>
2025-09-10 08:03:38 -03:00
Andrey Nering b4492299c1 fix(shell): block go test -exec and ensure it works using equals 2025-08-18 16:50:35 -03:00
Andrey Nering cbdd2e5220 fix(shell): refactor arguments blocker to check for flags in any position 2025-08-18 16:50:35 -03:00
Carlos Alexandro BeckerandGitHub 2a43184580 feat: grep should support gitignore/crushignore (#428)
* feat: support .crushignore as well as .gitignore
* docs: update
* refactor: simplify
* chore: fmt
* feat: grep should support gitignore/crushignore
* fix: small fixes
* fix: small fixes
* fix: ripgrep
* fix: rg
* fix: tst
* test: fixes
* refactor: organized code a bit
* fix: try
* fix: temp
* chore: lint

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-01 21:39:50 -04:00
Kujtim Hoxha 2fdbcac029 chore: better naming 2025-07-11 17:55:01 +02:00
Kujtim Hoxha f99f50427a refactor: improve command blocking system and fix test isolation
- Simplify command blocking logic by using utility functions instead of complex closures
- Add sudo to banned commands list
- Move command blocking from bash tool to shell layer for better separation of concerns
- Add comprehensive tests for command blocking functionality
- Fix test isolation by using temporary directories to prevent npm package files from polluting source tree
- Remove redundant command validation logic from bash tool
2025-07-11 00:21:19 +02:00