module

package
v0.1.40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

README

Description

  • Checks the module.yaml definition file.
  • Check that openapi conversions have human-readable description
  • Check oss info in the oss.yaml file.
  • Check license header in files.
  • Validates accessibility section in module.yaml files.
  • Validates update section in module.yaml files.

Accessibility Validation

The linter validates the optional accessibility section in module.yaml files:

Valid Editions
  • ce - Community Edition
  • fe - Free Edition
  • ee - Enterprise Edition
  • se - Standard Edition
  • se-plus - Standard Edition Plus
  • be - Business Edition
  • _default - Default behavior override
Valid Bundles
  • Minimal - Minimal bundle
  • Managed - Managed bundle
  • Default - Default bundle
Validation Rules
  • accessibility.editions is required when accessibility is specified
  • Each edition must have valid available (boolean) and enabledInBundles (array) fields
  • enabledInBundles must contain only valid bundle names
  • Edition names must be from the valid editions list
Example
accessibility:
  editions:
    _default:
      available: true
      enabledInBundles:
        - Minimal
        - Managed
        - Default
    ee:
      available: true
      enabledInBundles:
        - Minimal
        - Managed
        - Default

Update Validation

The linter validates the optional update section in module.yaml files:

Validation Rules
  • Each version entry must have both from and to fields populated
  • The to version must be greater than the from version
  • Versions must be in major.minor format (patch versions are not allowed)
  • Version entries must be sorted by from version ascending, then by to version ascending
  • For the same to version, there must not be duplicate from versions
Example
update:
  versions:
    - from: "1.16"
      to: "1.20"
    - from: "1.16"
      to: "1.25"
    - from: "1.17"
      to: "1.20"

Settings example

Module level

This linter has the following settings:

linters-settings:
  module:
    oss:
      disable: false
    deinition-file:
      disable: false
    conversions:
      disable: false
    exclude-rules:
      license:
        files:
          - images/upmeter/stress.sh
          - images/simple-bridge/rootfs/bin/simple-bridge
        directories:
          - hooks/venv/
    impact: error

Documentation

Index

Constants

View Source
const ID = "module"

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	ErrorList *errors.LintRuleErrorsList
	// contains filtered or unexported fields
}

Module linter

func New

func New(cfg *pkg.ModuleLinterConfig, errorList *errors.LintRuleErrorsList) *Module

func (*Module) Desc

func (l *Module) Desc() string

func (*Module) Name

func (l *Module) Name() string

func (*Module) Run

func (l *Module) Run(m *module.Module)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL