-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate: refactor internal methods to use
fs.FS
interface for file…
… handling (#413) * Refactor `validateStaticDocs()` and `validateLegacyWebsite()` to use a `fs.FS` interface for walking. * Refactor `validate_test.go` to use `fstest.MapFS` * Refactor `directory_test.go` to use `fstest.MapFS` * Add tests for file mismatch check * Fix `unparam` lints * Add changelog entries * Use `filepath.Join` instead of `website/docs` for windows compatability. * Revert "Use `filepath.Join` instead of `website/docs` for windows compatability." This reverts commit 9c92c3e. * Remove `filepath.Join()` usages and `/` separator conversions. * Remove `filepath.fromSlash()` usages * Use `path.Dir()` instead of `filepath.Dir()` * Use `doublestar.Match()` instead of `doublestar.PathMatch()` * Convert path slashes to os separators in error messages * Convert path slashes to os separators in invalid directory check error messages
- Loading branch information
Showing
83 changed files
with
1,064 additions
and
1,436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: BUG FIXES | ||
body: 'validate: File extension check now runs on `index.*` files instead of just `index.md` files.' | ||
time: 2024-10-22T16:38:05.530944-04:00 | ||
custom: | ||
Issue: "413" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: BUG FIXES | ||
body: 'validate: File extension check now specifies the correct valid extensions in the error message.' | ||
time: 2024-10-22T16:40:13.832638-04:00 | ||
custom: | ||
Issue: "413" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: BUG FIXES | ||
body: 'validate: Front matter check now runs with the correct options on legacy index files.' | ||
time: 2024-10-22T16:41:07.726856-04:00 | ||
custom: | ||
Issue: "413" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
internal/check/testdata/invalid-mixed-directories/docs/resources/thing.md
This file was deleted.
Oops, something went wrong.
Empty file removed
0
...nal/check/testdata/invalid-mixed-directories/website/docs/r/thing.html.markdown
Empty file.
Oops, something went wrong.