Skip to content

Commit fba1baa

Browse files
authored
Revert "[dmt] Create changelog rule (#318)"
This reverts commit 19b7de9.
1 parent d176885 commit fba1baa

File tree

7 files changed

+1
-201
lines changed

7 files changed

+1
-201
lines changed

internal/module/module.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ func mapModuleRules(linterSettings *pkg.LintersSettings, configSettings *config.
311311
rules.LicenseRule.SetLevel(globalRules.LicenseRule.Impact, fallbackImpact)
312312
rules.RequarementsRule.SetLevel(globalRules.RequarementsRule.Impact, fallbackImpact)
313313
rules.LegacyReleaseFileRule.SetLevel(globalRules.LegacyReleaseFileRule.Impact, fallbackImpact)
314-
rules.ChangelogRule.SetLevel(globalRules.ChangelogRule.Impact, fallbackImpact)
315314
}
316315

317316
// mapTemplatesRules configures Templates linter rules

pkg/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ type ModuleLinterRules struct {
220220
LicenseRule RuleConfig
221221
RequarementsRule RuleConfig
222222
LegacyReleaseFileRule RuleConfig
223-
ChangelogRule RuleConfig
224223
}
225224
type OSSRuleSettings struct {
226225
Disable bool

pkg/config/global/global.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ type ModuleLinterRules struct {
109109
LicenseRule RuleConfig `mapstructure:"license"`
110110
RequarementsRule RuleConfig `mapstructure:"requarements"`
111111
LegacyReleaseFileRule RuleConfig `mapstructure:"legacy-release-file"`
112-
ChangelogRule RuleConfig `mapstructure:"changelog"`
113112
}
114113

115114
type TemplatesLinterConfig struct {

pkg/linters/module/README.md

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Module linter performs automated checks on Deckhouse modules to validate con
88

99
## Rules
1010

11-
The Module linter includes **8 validation rules**:
11+
The Module linter includes **7 validation rules**:
1212

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

2423
---
2524

@@ -531,52 +530,3 @@ update:
531530
- from: "1.17"
532531
to: "1.20"
533532
```
534-
535-
---
536-
537-
### Changelog
538-
539-
Validates changelog.yaml file presence and content in modules.
540-
541-
**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.
542-
543-
**Checks:**
544-
- ✅ `changelog.yaml` file must exist in module root
545-
- ✅ File must not be empty (size > 0 bytes)
546-
547-
**Validation Logic:**
548-
- File `changelog.yaml` is required in the module root directory
549-
- File must contain content (not be empty)
550-
- Missing or empty files generate appropriate error messages
551-
552-
**Examples:**
553-
554-
```yaml
555-
# changelog.yaml - Valid changelog
556-
---
557-
features:
558-
Linting:
559-
Module:
560-
- Added new changelog validation rule to ensure proper changelog format
561-
- Enhanced module YAML file checking with additional validation rules
562-
- Improved license checking functionality with better error reporting
563-
- Added support for restricting UpdateMode to Auto in module configurations
564-
fixes:
565-
Linting:
566-
Module:
567-
- Fixed install output formatting issues
568-
- Corrected changelog rule validation logic
569-
- Resolved false positives in module YAML validation
570-
chore:
571-
Dependencies:
572-
- Updated helm.sh/helm/v3 dependency from 3.18.4 to 3.18.5
573-
Linting:
574-
- Refactored changelog validation code for better maintainability
575-
576-
```
577-
578-
**Error Examples:**
579-
```
580-
❌ changelog.yaml file is missing
581-
❌ changelog.yaml file is empty
582-
```

pkg/linters/module/module.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ func (l *Module) Run(m *module.Module) {
5656
CheckFiles(m, errorList.WithMaxLevel(l.cfg.Rules.LicenseRule.GetLevel()))
5757
rules.NewRequirementsRule().CheckRequirements(m.GetPath(), errorList.WithMaxLevel(l.cfg.Rules.RequarementsRule.GetLevel()))
5858
rules.NewLegacyReleaseFileRule().CheckLegacyReleaseFile(m.GetPath(), errorList.WithMaxLevel(l.cfg.Rules.LegacyReleaseFileRule.GetLevel()))
59-
rules.NewChangelogRule().CheckChangelog(m.GetPath(), errorList.WithMaxLevel(l.cfg.Rules.ChangelogRule.GetLevel()))
6059
}
6160

6261
func (l *Module) Name() string {

pkg/linters/module/rules/changelog.go

Lines changed: 0 additions & 69 deletions
This file was deleted.

pkg/linters/module/rules/changelog_test.go

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)