-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: generating reports, onboarding strategy
- Loading branch information
Showing
9 changed files
with
149 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
extends: capitalization | ||
message: "'%s' should use sentence-style capitalization." | ||
link: 'https://www.ibm.com/developerworks/library/styleguidelines/index.html#N1030C' | ||
link: "https://www.ibm.com/developerworks/library/styleguidelines/index.html#N1030C" | ||
level: suggestion | ||
scope: heading | ||
match: $sentence | ||
indicators: | ||
- ':' | ||
- ":" | ||
exceptions: | ||
- IBM | ||
- Red Hat |
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,18 @@ | ||
// Metadata for Antora | ||
:navtitle: Vale reports | ||
:keywords: reporting | ||
// :page-aliases: | ||
// End of metadata for Antora | ||
|
||
:parent-context-of-reporting-vale-alerts: {context} | ||
|
||
[id="generating-extended-vale-alerts-reports_{context}"] | ||
= Generating extended Vale alerts reports | ||
|
||
:context: generating-extended-vale-alerts-reports | ||
|
||
include::partial$proc_generating-extended-vale-alerts-reports.adoc[leveloffset=+1] | ||
|
||
|
||
:context: {parent-context-of-generating-extended-vale-alerts-reports}] | ||
|
8 changes: 4 additions & 4 deletions
8
...uide/pages/getting-started-with-vale.adoc → .../end-user-guide/pages/using-vale-cli.adoc
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
40 changes: 40 additions & 0 deletions
40
modules/end-user-guide/partials/proc_generating-extended-vale-alerts-reports.adoc
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,40 @@ | ||
:_module-type: PROCEDURE | ||
|
||
[id="proc_generating-extended-vale-alerts-reports_{context}"] | ||
= Generating extended Vale alerts reports | ||
|
||
Consider generating extended Vale alerts reports about a Git repository to: | ||
|
||
* Measure language compliance in a repository | ||
* Gather data before xref:defining-a-vale-onboarding-strategy.adoc[] | ||
|
||
These reports use the Vale report in JSON format and additional information such as the word count. | ||
|
||
.Prerequisites | ||
|
||
* The `vale` tool is installed and configured. See xref:getting-started-with-vale.adoc[]. | ||
* The `jq` tool is installed. See link:https://stedolan.github.io/jq/download/[Downloading `jq`]. | ||
|
||
.Procedure | ||
|
||
|
||
. Generate vale alerts reports for _<location>_: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ ./tools/report_vale_alerts.sh _<location>_ | ||
---- | ||
|
||
. The script creates following files for each Git repository found at _<location>_: | ||
+ | ||
`vale-report_<repository>_-list.log`:: List of AsciiDoc files considered for the report. | ||
`vale-report_<repository>_-wordcount.log`:: Word count for all files in the file list. Use this information to compare the number of alerts between repositories. | ||
`vale-report_<repository>_.json`:: Vale report in JSON format. Use the `jq` tool to query the results. | ||
`vale-report_<repository>_.severity`:: Breakdown of alerts by severity. | ||
`vale-report_<repository>_.rules`:: Breakdown of alerts by rules. | ||
|
||
.Additional resources | ||
|
||
* xref:understanding-vale-output.adoc[] | ||
* xref:defining-a-vale-onboarding-strategy.adoc[] | ||
|
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
6 changes: 3 additions & 3 deletions
6
modules/end-user-guide/partials/proc_using-vale-on-a-local-environment.adoc
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,29 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2021 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Loop on each git repository found on location given as argument, or current directory | ||
find "${1:-.}" -name .git -print | sed 's@/.git@@' | sort | uniq | while read directory; | ||
do | ||
echo "Generating report on $directory" | ||
# Provide a full list of files to report on | ||
# Ignore files containing a space | ||
FILE_LIST=$(find "${directory}" -type f -name '*.adoc' -print | sed '/ /d'| sort | uniq) | ||
REPORT_BASENAME=vale-report-$(basename "${directory}") | ||
# Create file list | ||
echo "$FILE_LIST" > "${REPORT_BASENAME}-list.log" | ||
# Count words in the corpus | ||
# shellcheck disable=SC2002,SC2086 | ||
cat $FILE_LIST | wc -w > "${REPORT_BASENAME}-wordcount.log" | ||
# Create Vale report | ||
# shellcheck disable=SC2086 | ||
vale --output=JSON --no-exit $FILE_LIST > "$REPORT_BASENAME.json" | ||
# A minimal analyze | ||
jq .[][].Severity "$REPORT_BASENAME.json" | sort | uniq -c | sort -nr > "$REPORT_BASENAME.severity" | ||
jq .[][].Check "$REPORT_BASENAME.json" | sort | uniq -c | sort -nr > "$REPORT_BASENAME.rules" | ||
done |