forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
150 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# IntelliJ IDEA | ||
.idea | ||
*.iml | ||
|
||
# Eclipse | ||
.classpath | ||
.project | ||
.settings | ||
bin | ||
|
||
# NetBeans | ||
/.nb-gradle | ||
/.nb-gradle-properties | ||
|
||
# OS X | ||
.DS_Store | ||
|
||
# Emacs | ||
*~ | ||
\#*\# | ||
|
||
# Vim | ||
.swp | ||
|
||
# Misspell binary | ||
internal/tools/bin | ||
|
||
# Node.js files for tools (e.g. markdown-toc) | ||
node_modules/ | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
extends: default | ||
|
||
rules: | ||
document-start: disable | ||
octal-values: enable | ||
truthy: | ||
allowed-values: ['true', 'false', 'on'] # 'on' for GH action trigger | ||
line-length: | ||
max: 200 | ||
indentation: | ||
check-multi-line-strings: false | ||
indent-sequences: consistent | ||
brackets: | ||
max-spaces-inside: 1 | ||
max-spaces-inside-empty: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# All documents to be used in spell check. | ||
ALL_DOCS := $(shell find . -type f -name '*.md' -not -path './.github/*' -not -path './node_modules/*' | sort) | ||
PWD := $(shell pwd) | ||
|
||
TOOLS_DIR := ./internal/tools | ||
MISSPELL_BINARY=bin/misspell | ||
MISSPELL = $(TOOLS_DIR)/$(MISSPELL_BINARY) | ||
|
||
# see https://github.com/open-telemetry/build-tools/releases for semconvgen updates | ||
# Keep links in semantic_conventions/README.md and .vscode/settings.json in sync! | ||
SEMCONVGEN_VERSION=0.11.0 | ||
|
||
# TODO: add `yamllint` step to `all` after making sure it works on Mac. | ||
.PHONY: all | ||
all: install-tools markdownlint misspell | ||
|
||
$(MISSPELL): | ||
cd $(TOOLS_DIR) && go build -o $(MISSPELL_BINARY) github.com/client9/misspell/cmd/misspell | ||
|
||
.PHONY: misspell | ||
misspell: $(MISSPELL) | ||
$(MISSPELL) -error $(ALL_DOCS) | ||
|
||
.PHONY: misspell-correction | ||
misspell-correction: $(MISSPELL) | ||
$(MISSPELL) -w $(ALL_DOCS) | ||
|
||
.PHONY: markdownlint | ||
markdownlint: | ||
@if ! npm ls markdownlint; then npm install; fi | ||
@for f in $(ALL_DOCS); do \ | ||
echo $$f; \ | ||
npx --no -p markdownlint-cli markdownlint -c .markdownlint.yaml $$f \ | ||
|| exit 1; \ | ||
done | ||
|
||
.PHONY: install-yamllint | ||
install-yamllint: | ||
# Using a venv is recommended | ||
pip install -U yamllint~=1.26.1 | ||
|
||
.PHONY: yamllint | ||
yamllint: | ||
yamllint . | ||
|
||
# Run all checks in order of speed / likely failure. | ||
.PHONY: check | ||
check: misspell markdownlint | ||
@echo "All checks complete" | ||
|
||
# Attempt to fix issues / regenerate tables. | ||
.PHONY: fix | ||
fix: misspell-correction | ||
@echo "All autofixes complete" | ||
|
||
.PHONY: install-tools | ||
install-tools: $(MISSPELL) | ||
npm install | ||
@echo "All tools installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/open-telemetry/opentelemetry-specification/internal/tools | ||
|
||
go 1.12 | ||
|
||
require github.com/client9/misspell v0.3.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= | ||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2019, OpenTelemetry Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
// +build tools | ||
|
||
package tools | ||
|
||
// This file follows the recommendation at | ||
// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module | ||
// on how to pin tooling dependencies to a go.mod file. | ||
// This ensures that all systems use the same version of tools in addition to regular dependencies. | ||
|
||
import ( | ||
_ "github.com/client9/misspell/cmd/misspell" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"devDependencies": { | ||
"markdown-link-check": "^3.9.3", | ||
"markdown-toc": "^1.2.0", | ||
"markdownlint-cli": "0.31.0" | ||
} | ||
} |