Skip to content

fix check for oss.yaml files#337

Merged
ldmonster merged 13 commits intomainfrom
oss-yaml-fix
Jan 26, 2026
Merged

fix check for oss.yaml files#337
ldmonster merged 13 commits intomainfrom
oss-yaml-fix

Conversation

@Suselz
Copy link
Member

@Suselz Suselz commented Jan 23, 2026

Description

This PR enhances the OSS (Open Source Software) validation in the DMT module linter by adding new required fields and improving error reporting.

Changes Made

1. Enhanced OSS Validation (oss_library.go)

  • Added new required fields to oss.yaml validation:
    • id - Project identifier (must not be empty)
    • version - Project version (must not be empty, should be valid semver)
  • Improved error handling: Refactored from returning error slices to using the centralized error list system for better error reporting and consistency
  • Added semantic versioning validation for version fields using the semver library
  • Enhanced error messages with specific object IDs for better debugging

2. Updated Documentation (README.md)

  • Expanded OSS validation section with comprehensive field descriptions
  • Added complete error message reference documenting all possible validation errors and warnings
  • Updated examples to include the new id and version fields
  • Added reference to ADR for version field requirements

3. Refactored Tests (oss_library_test.go)

  • Complete test rewrite to use the new error list system
  • Added comprehensive test cases covering all validation scenarios
  • Improved test structure with better organization and coverage

4. Cleanup

  • Removed obsolete README (README.md) as it was outdated

Signed-off-by: suselz <suselz@mail.ru>
Signed-off-by: suselz <suselz@mail.ru>
Signed-off-by: suselz <suselz@mail.ru>
Signed-off-by: suselz <suselz@mail.ru>
@Suselz Suselz self-assigned this Jan 23, 2026
@Suselz Suselz requested a review from ldmonster January 26, 2026 08:30
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
@ldmonster ldmonster merged commit 7cfffc1 into main Jan 26, 2026
3 checks passed
@ldmonster ldmonster deleted the oss-yaml-fix branch January 26, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants