diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 094fea45fd..e48d410bfe 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -9,7 +9,8 @@ labels: bug Which version of the demo you are using? (please provide either a specific [commit hash](https://github.com/open-telemetry/opentelemetry-demo-webstore/commits/main) -or a specific release). +or a specific +[release](https://github.com/open-telemetry/opentelemetry-demo-webstore/releases)). ## Symptom @@ -17,7 +18,7 @@ A clear and concise description of what the bug is. **What is the expected behavior?** -What did you expect to see? +What do you expect to see? **What is the actual behavior?** diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index fd757f158f..26cfc4870f 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -6,4 +6,4 @@ labels: question # Question -Use [Github Discussions](https://github.com/open-telemetry/opentelemetry-dotnet/discussions/new). +Use [Github Discussions](https://github.com/open-telemetry/opentelemetry-demo-webstore/discussions/). diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 93351d06e7..3793c1f0a2 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/stale@v5 with: - stale-pr-message: 'This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.' + stale-pr-message: 'This PR was marked stale due to lack of activity. It will be closed in 7 days.' close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.' operations-per-run: 400 days-before-pr-stale: 7 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..71d4b9f93c --- /dev/null +++ b/.gitignore @@ -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 diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000000..39c91cefa1 --- /dev/null +++ b/.yamllint @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..9dd1f84a3b --- /dev/null +++ b/Makefile @@ -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" diff --git a/internal/tools/go.mod b/internal/tools/go.mod new file mode 100644 index 0000000000..aeac23a1d3 --- /dev/null +++ b/internal/tools/go.mod @@ -0,0 +1,5 @@ +module github.com/open-telemetry/opentelemetry-specification/internal/tools + +go 1.12 + +require github.com/client9/misspell v0.3.4 diff --git a/internal/tools/go.sum b/internal/tools/go.sum new file mode 100644 index 0000000000..ee5948021f --- /dev/null +++ b/internal/tools/go.sum @@ -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= diff --git a/internal/tools/tools.go b/internal/tools/tools.go new file mode 100644 index 0000000000..bfa021b18f --- /dev/null +++ b/internal/tools/tools.go @@ -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" +) diff --git a/package.json b/package.json new file mode 100644 index 0000000000..94e1ead289 --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "devDependencies": { + "markdown-link-check": "^3.9.3", + "markdown-toc": "^1.2.0", + "markdownlint-cli": "0.31.0" + } +}