Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion internal/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ func mapModuleRules(linterSettings *pkg.LintersSettings, configSettings *config.
rules.LicenseRule.SetLevel(globalRules.LicenseRule.Impact, fallbackImpact)
rules.RequarementsRule.SetLevel(globalRules.RequarementsRule.Impact, fallbackImpact)
rules.LegacyReleaseFileRule.SetLevel(globalRules.LegacyReleaseFileRule.Impact, fallbackImpact)
rules.ChangelogRule.SetLevel(globalRules.ChangelogRule.Impact, fallbackImpact)
}

// mapTemplatesRules configures Templates linter rules
Expand Down
1 change: 0 additions & 1 deletion pkg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ type ModuleLinterRules struct {
LicenseRule RuleConfig
RequarementsRule RuleConfig
LegacyReleaseFileRule RuleConfig
ChangelogRule RuleConfig
}
type OSSRuleSettings struct {
Disable bool
Expand Down
1 change: 0 additions & 1 deletion pkg/config/global/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ type ModuleLinterRules struct {
LicenseRule RuleConfig `mapstructure:"license"`
RequarementsRule RuleConfig `mapstructure:"requarements"`
LegacyReleaseFileRule RuleConfig `mapstructure:"legacy-release-file"`
ChangelogRule RuleConfig `mapstructure:"changelog"`
}

type TemplatesLinterConfig struct {
Expand Down
52 changes: 1 addition & 51 deletions pkg/linters/module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Module linter performs automated checks on Deckhouse modules to validate con

## Rules

The Module linter includes **8 validation rules**:
The Module linter includes **7 validation rules**:

| Rule | Description | Configurable |
|------|-------------|--------------|
Expand All @@ -19,7 +19,6 @@ The Module linter includes **8 validation rules**:
| [**license**](#license) | Validates license headers in source files | ✅ Yes |
| [**requirements**](#requirements) | Validates version requirements for features | ❌ No |
| [**legacy-release-file**](#legacy-release-file) | Checks for deprecated `release.yaml` file | ❌ No |
| [**changelog**](#changelog) | Validates changelog file presence and content | ❌ No |

---

Expand Down Expand Up @@ -531,52 +530,3 @@ update:
- from: "1.17"
to: "1.20"
```

---

### Changelog

Validates changelog.yaml file presence and content in modules.

**Purpose:** Ensures modules have a changelog file that documents changes and version history. This maintains transparency about module evolution and helps users understand what changes are included in each version.

**Checks:**
- ✅ `changelog.yaml` file must exist in module root
- ✅ File must not be empty (size > 0 bytes)

**Validation Logic:**
- File `changelog.yaml` is required in the module root directory
- File must contain content (not be empty)
- Missing or empty files generate appropriate error messages

**Examples:**

```yaml
# changelog.yaml - Valid changelog
---
features:
Linting:
Module:
- Added new changelog validation rule to ensure proper changelog format
- Enhanced module YAML file checking with additional validation rules
- Improved license checking functionality with better error reporting
- Added support for restricting UpdateMode to Auto in module configurations
fixes:
Linting:
Module:
- Fixed install output formatting issues
- Corrected changelog rule validation logic
- Resolved false positives in module YAML validation
chore:
Dependencies:
- Updated helm.sh/helm/v3 dependency from 3.18.4 to 3.18.5
Linting:
- Refactored changelog validation code for better maintainability

```

**Error Examples:**
```
❌ changelog.yaml file is missing
❌ changelog.yaml file is empty
```
1 change: 0 additions & 1 deletion pkg/linters/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func (l *Module) Run(m *module.Module) {
CheckFiles(m, errorList.WithMaxLevel(l.cfg.Rules.LicenseRule.GetLevel()))
rules.NewRequirementsRule().CheckRequirements(m.GetPath(), errorList.WithMaxLevel(l.cfg.Rules.RequarementsRule.GetLevel()))
rules.NewLegacyReleaseFileRule().CheckLegacyReleaseFile(m.GetPath(), errorList.WithMaxLevel(l.cfg.Rules.LegacyReleaseFileRule.GetLevel()))
rules.NewChangelogRule().CheckChangelog(m.GetPath(), errorList.WithMaxLevel(l.cfg.Rules.ChangelogRule.GetLevel()))
}

func (l *Module) Name() string {
Expand Down
69 changes: 0 additions & 69 deletions pkg/linters/module/rules/changelog.go

This file was deleted.

77 changes: 0 additions & 77 deletions pkg/linters/module/rules/changelog_test.go

This file was deleted.