Skip to content

Commit

Permalink
add markdown linting to makefile and github actions (reference: #464)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydeluca authored and tigrannajaryan committed Jul 19, 2023
1 parent 1ced00e commit 199d94d
Show file tree
Hide file tree
Showing 6 changed files with 605 additions and 9 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,15 @@ jobs:

- name: run markdown-link-check
run: make markdown-link-check

markdownlint:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2

- name: install dependencies
run: npm install

- name: run markdownlint
run: make markdownlint
14 changes: 14 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
# and https://github.com/DavidAnson/markdownlint/blob/main/README.md

# Default state for all rules
default: true

ul-style: false
line-length: false
no-duplicate-header:
siblings_only: true
ol-prefix:
style: ordered
no-inline-html: false
fenced-code-language: false
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Full list of differences found in [this compare](https://github.com/open-telemet
* Add `csharp_namespace` option to protos.
([#399](https://github.com/open-telemetry/opentelemetry-proto/pull/399))
* Fix some out-of-date urls which link to [specification](https://github.com/open-telemetry/opentelemetry-specification). ([#402](https://github.com/open-telemetry/opentelemetry-proto/pull/402))
* :stop_sign: [BREAKING] Delete deprecated InstrumentationLibrary,
* :stop_sign: [BREAKING] Delete deprecated InstrumentationLibrary,
InstrumentationLibraryLogs, InstrumentationLibrarySpans and
InstrumentationLibraryMetrics messages. Delete deprecated
instrumentation_library_logs, instrumentation_library_spans and
Expand Down Expand Up @@ -137,7 +137,7 @@ Full list of differences found in [this compare](https://github.com/open-telemet

* Remove unused deprecated message StringKeyValue (#358)
* Remove experimental metrics config service (#359)

## 0.12.0 - 2022-01-19

Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.11.0...v0.12.0).
Expand Down Expand Up @@ -288,9 +288,9 @@ Full list of differences found in [this compare.](https://github.com/open-teleme
### Changed
* :stop_sign: [BREAKING] Metrics - protocol was refactored, and lots of breaking changes.
** Removed MetricDescriptor and embedded into Metric and the new data types.
** Add new data types Gauge/Sum/Histogram.
** Make use of the "AggregationTemporality" into the data types that allow that support.
* Removed MetricDescriptor and embedded into Metric and the new data types.
* Add new data types Gauge/Sum/Histogram.
* Make use of the "AggregationTemporality" into the data types that allow that support.
* Rename enum values to follow the proto3 style guide.
### Added
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(1)
endef

.PHONY: all
all: gen-all markdown-link-check
all: gen-all markdown-link-check markdownlint

# Generate all implementations
.PHONY: gen-all
Expand Down Expand Up @@ -165,3 +165,12 @@ markdown-link-check:
npx --no -- markdown-link-check --quiet --config .markdown_link_check_config.json $$f \
|| exit 1; \
done

.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
Loading

0 comments on commit 199d94d

Please sign in to comment.