Skip to content

Commit

Permalink
Add mdl/yamlint to github workflow (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnamiriyala authored Jul 14, 2023
1 parent 591f6b8 commit 50f093f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:
run: |
mkdir -p $(go env GOPATH)
mkdir -p $(go env GOCACHE)
make lint
make lint mlint
8 changes: 5 additions & 3 deletions .mdl_style.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
all


exclude_rule 'MD041' #
exclude_rule 'MD009' # Trailing spaces
exclude_rule 'MD010' # Hard tabs
exclude_rule 'MD012' # Multiple consecutive blank lines
exclude_rule 'MD013' # Line length
exclude_rule 'MD034' # Bare URL used
exclude_rule 'MD024' # Multiple headers with the same content
exclude_rule 'MD029' # Ordered list item prefix
exclude_rule 'MD033' # Inline HTML
exclude_rule 'MD034' # Bare URL used
exclude_rule 'MD036' # Emphasis used instead of a header
exclude_rule 'MD041' # First line in file should be a top level header
4 changes: 4 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends: default
rules:
truthy:
level: warning
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci: lint test build ## Run only ci targets that lint/build/test the code
all: clean update lint_fix doc ci benchmarks ## Run all the targets including the ones that generate files/docs etc ...

help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-25s\033[0m %s\n", $$1 , $$2}'
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[31m%-25s\033[0m \033[32m%s\033[0m\n", $$1 , $$2}'

doc: ## Build source and api documentation
build/docs.sh
Expand Down Expand Up @@ -35,5 +35,5 @@ install_tools:
build/install_tools.sh

mlint: ## Run miscellaneous md/yaml linters in view-only mode
yamllint *.yaml .github/workflows/*.yml || true
mdl -s .mdl_style.rb *.md docs/*.md || true
yamllint --no-warnings -c .yamllint.yml *.yaml .github/workflows/*.yml
mdl -s .mdl_style.rb *.md docs/*.md
3 changes: 2 additions & 1 deletion docs/DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ type TenancyInfo struct {
```

<a name="TestHelper"></a>
## type [TestHelper](<https://github.com/vmware-labs/multi-tenant-persistence-for-saas/blob/main/pkg/datastore/datastore.go#L85-L89>)
## type [TestHelper](<https://github.com/vmware-labs/multi-tenant-persistence-for-saas/blob/main/pkg/datastore/datastore.go#L85-L90>)



Expand All @@ -903,6 +903,7 @@ type TestHelper interface {
DropTables(records ...Record) error // Drop DB tables by records
Truncate(tableNames ...string) error // Truncates DB tables
TruncateCascade(cascade bool, tableNames ...string) error // Truncates DB tables, with an option to truncate them in a cascading fashion
HasTable(tableName string) (bool, error) // Checks if DB table exists
}
```

Expand Down

0 comments on commit 50f093f

Please sign in to comment.