Skip to content

Commit

Permalink
feature: Analyzer Configuration (#2842) (#2856)
Browse files Browse the repository at this point in the history
* feature(backend): Enabling Analyzer Configuration (#2842)

* feature: Enabling Analyzer Configuration

* feature: Enabling Analyzer Configuration

* cleanup and improvements

* cleanup and improvements

* improvements, upgrades and simplification

* improvements, upgrades and simplification

* adding tests for the analyzer and linter

* fixing linter runner

* updates and fixes based on PR review comments

* removing unnecessary loop

* feature(frontend): Analyzer Configuration (#2850)

* feature: Enabling Analyzer Configuration

* feature: Enabling Analyzer Configuration

* cleanup and improvements

* cleanup and improvements

* improvements, upgrades and simplification

* improvements, upgrades and simplification

* adding tests for the analyzer and linter

* fixing linter runner

* feature(frontend): Analyzer Configuration

* feature(frontend): Analyzer Configuration

* updates and fixes based on PR review comments

* clean up changes

* fix(frontend): fix analyzer score styles (#2860)

* feature(cli): Analyzer Configuration (#2873)

* remove file with conflict

* fix disabled rule logic

---------

Co-authored-by: Jorge Padilla <jorge.esteban.padilla@gmail.com>
  • Loading branch information
xoscar and jorgeepc committed Jul 10, 2023
1 parent 520dad5 commit 0c40fd6
Show file tree
Hide file tree
Showing 76 changed files with 2,692 additions and 1,044 deletions.
47 changes: 43 additions & 4 deletions api/linters.yaml
Expand Up @@ -33,12 +33,47 @@ components:
LinterResourcePlugin:
type: object
properties:
id:
type: string
name:
type: string
readOnly: true
description:
type: string
readOnly: true
enabled:
type: boolean
required:
type: boolean
rules:
type: array
items:
$ref: "#/components/schemas/LinterResourceRule"
LinterResourceRule:
type: object
properties:
id:
type: string
weight:
type: integer
name:
type: string
readOnly: true
description:
type: string
readOnly: true
errorDescription:
type: string
readOnly: true
tips:
type: array
items:
type: string
readOnly: true
errorLevel:
type: string
enum:
- error
- warning
- disabled
LinterResult:
type: object
properties:
Expand Down Expand Up @@ -88,6 +123,12 @@ components:
type: array
items:
$ref: "#/components/schemas/LinterResultPluginRuleResult"
level:
type: string
enum:
- error
- warning
- disabled
LinterResultPluginRuleResult:
type: object
properties:
Expand All @@ -111,8 +152,6 @@ components:
type: string
expected:
type: string
level:
type: string
description:
type: string
suggestions:
Expand Down
6 changes: 6 additions & 0 deletions cli/cmd/resources.go
Expand Up @@ -91,6 +91,12 @@ var (
{Header: "NAME", Path: "spec.name"},
{Header: "ENABLED", Path: "spec.enabled"},
{Header: "MINIMUM SCORE", Path: "spec.minimumScore"},
{Header: "PLUGINS", Path: "spec.total.plugins"},
},
ItemModifier: func(item *gabs.Container) error {
item.SetP(len(item.Path("spec.plugins").Children()), "spec.total.plugins")

return nil
},
}),
),
Expand Down
112 changes: 90 additions & 22 deletions cli/openapi/model_linter_resource_plugin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0c40fd6

Please sign in to comment.