rules

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConversionsRuleName = "conversions"
)
View Source
const (
	DefinitionFileRuleName = "definition-file"
)
View Source
const (
	LicenseRuleName = "license"
)
View Source
const (
	ModuleConfigFilename = "module.yaml"
)
View Source
const (
	OSSRuleName = "oss"
)

Variables

View Source
var CELicenseRe = regexp.MustCompile(`(?s)[/#{!-]*(\s)*Copyright 202[1-9] Flant JSC[-!}\n#/]*
[/#{!-]*(\s)*Licensed under the Apache License, Version 2\.0 \(the "License"\);[-!}\n]*
[/#{!-]*(\s)*you may not use this file except in compliance with the License\.[-!}\n]*
[/#{!-]*(\s)*You may obtain a copy of the License at[-!}\n#/]*
[/#{!-]*(\s)*http://www\.apache\.org/licenses/LICENSE-2\.0[-!}\n#/]*
[/#{!-]*(\s)*Unless required by applicable law or agreed to in writing, software[-!}\n]*
[/#{!-]*(\s)*distributed under the License is distributed on an "AS IS" BASIS,[-!}\n]*
[/#{!-]*(\s)*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[-!}\n]*
[/#{!-]*(\s)*See the License for the specific language governing permissions and[-!}\n]*
[/#{!-]*(\s)*limitations under the License\.[-!}\n]*`)

Functions

This section is empty.

Types

type ConversionsRule

type ConversionsRule struct {
	pkg.RuleMeta
	pkg.BoolRule
}

func NewConversionsRule

func NewConversionsRule(disable bool) *ConversionsRule

func (*ConversionsRule) CheckConversions

func (r *ConversionsRule) CheckConversions(modulePath string, errorList *errors.LintRuleErrorsList)

type DeckhouseModule

type DeckhouseModule struct {
	Name         string              `json:"name"`
	Namespace    string              `json:"namespace"`
	Weight       uint32              `json:"weight,omitempty"`
	Tags         []string            `json:"tags"`
	Subsystems   []string            `json:"subsystems,omitempty"`
	Stage        string              `json:"stage"`
	Description  string              `json:"description,omitempty"`
	Descriptions ModuleDescriptions  `json:"descriptions,omitempty"`
	Requirements *ModuleRequirements `json:"requirements,omitempty"`
}

type DefinitionFileRule

type DefinitionFileRule struct {
	pkg.RuleMeta
	pkg.BoolRule
}

func NewDefinitionFileRule

func NewDefinitionFileRule(disable bool) *DefinitionFileRule

func (*DefinitionFileRule) CheckDefinitionFile

func (r *DefinitionFileRule) CheckDefinitionFile(modulePath string, errorList *errors.LintRuleErrorsList)

type LicenseRule added in v0.1.3

type LicenseRule struct {
	pkg.RuleMeta
	pkg.PathRule
}

func NewLicenseRule added in v0.1.3

func NewLicenseRule(excludeFilesRules []pkg.StringRuleExclude,
	excludeDirectoryRules []pkg.PrefixRuleExclude) *LicenseRule

func (*LicenseRule) CheckFiles added in v0.1.3

func (r *LicenseRule) CheckFiles(mod *module.Module, errorList *errors.LintRuleErrorsList)

type ModuleDescriptions added in v0.1.4

type ModuleDescriptions struct {
	English string `json:"en,omitempty"`
	Russian string `json:"ru,omitempty"`
}

type ModulePlatformRequirements

type ModulePlatformRequirements struct {
	Deckhouse    string `json:"deckhouse,omitempty"`
	Kubernetes   string `json:"kubernetes,omitempty"`
	Bootstrapped bool   `json:"bootstrapped,omitempty"`
}

type ModuleRequirements

type ModuleRequirements struct {
	ModulePlatformRequirements `json:",inline"`
	ParentModules              map[string]string `json:"modules,omitempty"`
}

type OSSRule

type OSSRule struct {
	pkg.RuleMeta
	pkg.BoolRule
}

func NewOSSRule

func NewOSSRule(disable bool) *OSSRule

func (*OSSRule) OssModuleRule

func (r *OSSRule) OssModuleRule(moduleRoot string, errorList *errors.LintRuleErrorsList)

Jump to

Keyboard shortcuts

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