chore: even more linting, test fixes (#24)

* chore(lint): funcorder

* chore(lint): yamlfmt, ignored broken test yaml files

* chore(tests): tests do not output garbage, add coverage

* chore(lint): fix editorconfig violations

* chore(lint): move from eclint to editorconfig-checker

* chore(lint): add pre-commit, run and fix

* chore(ci): we use renovate to manage updates
This commit is contained in:
2025-08-06 23:44:32 +03:00
committed by GitHub
parent c5a7ced768
commit b80ecfce92
56 changed files with 809 additions and 601 deletions

View File

@@ -563,19 +563,18 @@ func TestGenerator_WithDifferentThemes(t *testing.T) {
t.Parallel()
themes := []string{"default", "github", "gitlab", "minimal", "professional"}
tmpDir, cleanup := testutil.TempDir(t)
defer cleanup()
// Set up test templates
testutil.SetupTestTemplates(t, tmpDir)
actionPath := filepath.Join(tmpDir, "action.yml")
testutil.WriteTestFile(t, actionPath, testutil.MustReadFixture("actions/javascript/simple.yml"))
for _, theme := range themes {
t.Run("theme_"+theme, func(t *testing.T) {
t.Parallel()
// Templates are now embedded, no working directory changes needed
// Create separate temp directory for each theme test
tmpDir, cleanup := testutil.TempDir(t)
defer cleanup()
// Set up test templates for this theme test
testutil.SetupTestTemplates(t, tmpDir)
actionPath := filepath.Join(tmpDir, "action.yml")
testutil.WriteTestFile(t, actionPath, testutil.MustReadFixture("actions/javascript/simple.yml"))
config := &AppConfig{
Theme: theme,
@@ -596,11 +595,6 @@ func TestGenerator_WithDifferentThemes(t *testing.T) {
if len(readmeFiles) == 0 {
t.Errorf("no output file was created for theme %s", theme)
}
// Clean up for next test
for _, file := range readmeFiles {
_ = os.Remove(file)
}
})
}
}