Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ PASS (0.00158s) modelsource/MyFirstModule/DomainModels$DomainModel.yaml
![Mendix Lint report](./resources/lint-xunit-report.png)
Lint Mendix Yaml files. This tool checks for common mistakes and enforces best practices. It uses OPA as policy engine. Therefore policies must be written in the powerful Rego language. Please refer to [Rego language reference](https://www.openpolicyagent.org/docs/latest/policy-reference/) for more information on the syntax and semantics.

### NOQA (Ignore document)

A specific document can be marked as "Skipped" if you have a line in the `documentation` field that starts with either `#noqa` or `# noqa` followed by an optional message (Case in-sensitive). This message will be included as "Skipped" reason in linting results.

## watch

Watch for changes in the model and lint the changes.
Expand Down
3 changes: 2 additions & 1 deletion lint/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ func evalTestcase(rulePath string, queryString string, inputFilePath string) (*T
lines := strings.Split(doc, "\n")
for _, line := range lines {
line = strings.TrimSpace(line)
if strings.HasPrefix(line, NOQA) || strings.HasPrefix(line, NOQA_ALIAS) {
lineLower := strings.ToLower(line)
if strings.HasPrefix(lineLower, NOQA) || strings.HasPrefix(lineLower, NOQA_ALIAS) {
return &Testcase{
Name: inputFilePath,
Time: 0,
Expand Down