37 Commits

Author SHA1 Message Date
Luke Hagar
4fb0c9b375 Add watch mode functionality to Slinky for real-time link checking
This update introduces a watch mode that monitors file changes and automatically re-scans for broken links. The feature enhances the user experience during development by providing real-time updates and ensuring links remain valid as files are modified. Additionally, the README has been updated to include usage instructions and details about the new watch mode capabilities.
2025-09-23 19:26:00 +00:00
Luke Hagar
5ff8337397 Enhance ignore logic in CollectURLsWithIgnoreConfig to include debug output for ignored paths. This change improves visibility into the URL collection process by logging paths that are ignored based on specified patterns, while also cleaning up redundant checks for ignored paths. 2025-09-19 19:19:33 +00:00
Luke Hagar
f74fe031f2 Add debug logging for filesystem traversal in URL collection functions
Introduce debug output in CollectURLsWithIgnoreConfig, CollectURLsProgressWithIgnoreConfig, and CollectURLsV2 functions to log the paths being walked during filesystem traversal. This change aids in debugging and provides better visibility into the URL collection process.
2025-09-19 19:06:44 +00:00
Luke Hagar
1b5d18b4a4 Remove debug logging from URL collection functions in fsurls.go. This change cleans up the code by eliminating unnecessary debug output during filesystem traversal, streamlining the URL collection process. 2025-09-19 19:04:06 +00:00
Luke Hagar
b4f2754ad1 Add PatternMatcher for improved include/ignore logic in fsurls.go
Introduce a new PatternMatcher type to handle include and ignore patterns more effectively. Implement methods for checking if paths should be included or ignored based on specified patterns. Additionally, enhance the LoadSlinkyIgnorePatterns function to parse .slinkignore files and compile ignore patterns, improving the URL collection process. This change streamlines the handling of file and directory patterns, ensuring better accuracy in URL extraction.
2025-09-19 18:54:52 +00:00
Luke Hagar
b31745a4da Refactor URL collection functions to utilize pre-loaded ignore configurations
Enhance the CollectURLs and CollectURLsProgress functions in fsurls.go to accept pre-loaded ignore configurations, reducing redundant loading of .gitignore and .slinkignore files. Update the init function in check.go to load these configurations once for all targets, improving efficiency in URL collection processes.
2025-09-19 18:26:40 +00:00
Luke Hagar
c42386c8e8 Add debug logging for ignored files and .slinkignore detection in fsurls.go
Enhance the CollectURLs and CollectURLsProgress functions to include debug output when files are ignored based on ignore patterns. Additionally, add debug statements to log the detection of .slinkignore files and the compilation of ignore patterns. This change improves traceability during URL collection and helps in debugging ignore logic.
2025-09-19 18:12:37 +00:00
Luke Hagar
a3c7a2adf2 Update CheckURLs function to treat HTTP 429 status as valid links alongside 401, 403, and 408. This enhancement improves the URL validation logic by accommodating scenarios where links may be valid but indicate rate limiting. 2025-09-16 21:00:05 +00:00
Luke Hagar
2c3a5b5c04 Update CheckURLs function to treat HTTP 408 status as valid links alongside 401 and 403. This change enhances the URL validation logic by allowing for additional scenarios where links may be valid but require authorization or indicate a timeout. 2025-09-16 20:57:56 +00:00
Luke Hagar
f3acb36e36 Add logic to skip .slinkignore files during URL collection in fsurls.go
Enhance the CollectURLs and CollectURLsProgress functions to ensure that any .slinkignore files are excluded from scanning. This change improves the handling of ignored paths and maintains consistency in the ignore logic.
2025-09-16 19:55:54 +00:00
Luke Hagar
3427464985 Refactor ignore path handling in fsurls.go to improve whitespace trimming and add recursive matching for directory-like patterns. Enhance the logic to compile ignore lines more effectively, ensuring better support for various ignore scenarios. 2025-09-13 03:42:12 +00:00
Luke Hagar
7808f2337b Enhance URL ignoring logic in fsurls.go to support wildcard patterns and add tests for ignoring specific URLs. Introduce a new function to convert wildcard patterns to regex for improved matching accuracy. 2025-09-13 03:34:12 +00:00
Luke Hagar
d2dbfe9dd1 Update .slinkignore to include additional SailPoint API URLs and enhance test coverage for ignored URLs. Modify tests to ensure proper handling of ignored paths and URLs, including node_modules and package-lock.json. 2025-09-13 03:17:44 +00:00
Luke Hagar
4af80ed208 Refactor .slinkignore loading logic in fsurls.go to improve configuration detection and error handling. Introduce findSlinkyConfig function to search for .slinkignore files in parent directories. Enhance JSON parsing with relaxed error handling and emit warnings for misconfigurations. 2025-09-13 02:27:37 +00:00
Luke Hagar
04fb6f150a Fix markdown chunking in check.go by removing extra newline and comment out debug logging in fsurls.go for cleaner output during URL collection. 2025-09-13 01:59:11 +00:00
Luke Hagar
211fafe931 Refactor string splitting in check.go and fsurls.go to use strings.SplitSeq for improved performance. Enhance debug output for .gitignore and .slinkignore file handling, providing clearer logging during file checks and reads. 2025-09-13 01:49:22 +00:00
Luke Hagar
2df17e8247 Refactor URL extraction in fsurls.go to improve handling of matches and offsets. Replace extractCandidates with extractCandidateMatches for better clarity and accuracy in URL processing. Update WriteMarkdown function to enhance link formatting in reports, ensuring correct display and linking of file paths with line numbers. 2025-09-13 01:14:55 +00:00
Luke Hagar
54d7797089 Add .slinkignore support for URL and path exclusions
Introduce a new .slinkignore file format to allow users to specify paths and URLs to ignore during scanning. Update the CollectURLs and CollectURLsProgress functions to respect these ignore rules. Add tests to verify the functionality of the .slinkignore file, ensuring that specified paths and URLs are excluded from results. Update README.md to document the new feature and its usage.
2025-09-12 20:56:45 +00:00
Luke Hagar
ae5fcf868c Enhance URL extraction in fsurls.go by introducing new trimming functions for leading and trailing delimiters, improving URL sanitization. Update regex patterns for better markdown handling and adjust the extractCandidates function to support relative paths. Add tests to validate URL sanitization and preservation of balanced parentheses. 2025-09-12 20:37:23 +00:00
Luke Hagar
1c32afafa6 Remove unnecessary HTML details tags from markdown output in WriteMarkdown function, streamlining the generated report format. 2025-09-12 20:06:57 +00:00
Luke Hagar
3a9fdfb479 Improve timezone handling in WriteMarkdown function of markdown.go by adding error checking for LoadLocation and providing a fallback to a fixed timezone if loading fails. 2025-09-12 19:06:00 +00:00
Luke Hagar
d54ac41670 Refactor PR comment handling by moving it to the CLI in check.go, removing the previous implementation from entrypoint.sh. Enhance report summary to include the number of files scanned and ensure markdown report generation is streamlined. 2025-09-12 18:32:42 +00:00
Luke Hagar
64c05b380c Enhance URL scanning functionality in check.go by allowing comma-separated targets and improving debug output. Refactor root.go and run.go to support new target handling and display scanned file counts in the TUI. Introduce CollectURLsProgress in fsurls.go for detailed file processing feedback. 2025-09-12 16:50:40 +00:00
Luke Hagar
c563c8026f Add debug output for path walking in CollectURLs function in fsurls.go to aid in troubleshooting. 2025-09-12 15:04:39 +00:00
Luke Hagar
302eddc97e Add debug output for consolidated configuration and CLI arguments in entrypoint.sh 2025-09-12 14:55:53 +00:00
Luke Hagar
d12791ef42 Refactor error handling and formatting in WriteMarkdown function of markdown.go for improved readability and consistency. 2025-09-11 22:23:00 +00:00
Luke Hagar
631a571ecf Refactor markdown report generation in markdown.go to improve formatting and structure, including reordering summary details and consolidating optional root path handling. 2025-09-11 22:18:52 +00:00
Luke Hagar
3040577b67 Update test cases in fsurls_test.go and lang_files_test.go to include the new parameter for URL collection in CollectURLs function. 2025-09-11 22:06:20 +00:00
Luke Hagar
90845181d9 Update fsCollect function in fs_bridge.go to include an additional parameter for URL collection, enhancing its functionality. 2025-09-11 22:03:05 +00:00
Luke Hagar
6d9be77a14 Update markdown report generation to combine last run and duration details into a single line for improved clarity. 2025-09-11 21:43:08 +00:00
Luke Hagar
666294151e Add message for no issues found in markdown report generation and handle file creation accordingly in markdown.go 2025-09-11 21:29:15 +00:00
Luke Hagar
f3804fcd2d Add respect_gitignore input to action.yml and update related logic in entrypoint.sh, check.go, and fsurls.go to support .gitignore handling during URL collection. 2025-09-11 21:02:14 +00:00
Luke Hagar
9148a9108c Enhance PR comment handling in entrypoint.sh to update existing comments or create new ones, and improve markdown report generation in markdown.go by adding optional root path and duration details. 2025-09-11 20:00:18 +00:00
Luke Hagar
a0598ac3e9 Fix trailing delimiter check in fsurls.go to include double quotes for accurate string trimming 2025-09-11 19:41:56 +00:00
Luke Hagar
1f593407ca Add debug logging for scanned files in fsurls.go to improve visibility during URL collection 2025-09-11 18:58:43 +00:00
Luke Hagar
56bd74b49d Update test file paths to use 'testdata' directory for consistency in URL collection tests 2025-09-11 17:01:01 +00:00
Luke Hagar
c753d4031a pushing the rest 2025-09-11 15:59:53 +00:00