Skip to content

Grammar and style check #492

Open
0 of 1 issue completed
Open

Description

@stevespringett

The CycloneDX specification must have grammar and style checks. Ideally, checks would be performed:

  • On demand via GitHub Action
  • On PRs - fail if grammar or style violations occur

Grammar check should adhere to ISO House Style where British English is used to describe the specification, but is not required for the specification itself. The ISO House Style also requires American English for certain words with Greek origin (e.g. standardization - with a 'z' not an 's').

Acceptance criteria:

  • Scoped to JSON Schema only. Checks for XML and Protobuf are optional and nice-to-have.

  • Schema properties

    • American English spell check on property names
    • Enforce lower camel case on property names
  • Property titles:

    • Titles must be sentence case
    • British English (ISO House Style) spell check enforced
  • Property descriptions (description and meta:enum)

    • Descriptions must be sentence case
    • Descriptions must form at least one complete sentence
    • Descriptions must end in a single full-stop (.)
    • British English (ISO House Style) spell check enforced
    • Grammar check
    • Ensure RFC-2119 style capitalization of MUST, SHOULD, etc are NOT used in descriptions
  • Enumeration values

    • TODO: Define

Experiments

I have been experimenting with spelling and grammar checks with GitHub Actions in my personal repo. See
https://github.com/stevespringett/jsonschema-grammar-action and https://github.com/stevespringett/jsonschema-grammar-action/tree/main/.github/workflows

References

The Ecma Rules for Editing and Distribution may be used as reference in addition to the ISO House Style.

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added this to the 1.7 milestone on Jul 11, 2024
  2. changed the title [-]Grammer and style check[/-] [+]Grammar and style check[/+] on Jul 11, 2024
  3. modified the milestones: 1.7, 2.0 on Sep 11, 2025
  4. stevespringett commented on Nov 12, 2025

    @stevespringett
    MemberAuthor

    Additionally, the word "must" does not imply a requirement for ISO standards. The word "shall" does mean that something is a requirement. Therefore, much like we did for 1.7 in an automated way, we need to replace in the schemas themselves along with checking and blocking on the use of the word.

  5. jkowalleck commented on Aug 24, 2026

    @jkowalleck
    Member

    workin on some automation for this.

    probably based on the existing tooling we have.

  6. jkowalleck commented on Aug 25, 2026

    @jkowalleck
    Member

    added linter as a regular GH workflow: #1048
    this runs on pullrequests and in major merges/pushes

  7. added
    CDX 2.0
    on Aug 25, 2026
  8. jkowalleck commented on Aug 27, 2026

    @jkowalleck
    Member

    re: #492 (comment)

    current status as of https://github.com/CycloneDX/specification/actions/runs/33088497811


    Summary for 2.0

    Reports: https://github.com/CycloneDX/specification/actions/runs/33088497811/artifacts/9653288377

    By CheckID

    checkId error warning info
    ❌ description-full-stop 69 0 0
    ⚠️ description-oxford-english 0 561 0
    ❌ duplicate-content 184 33 0
    ✅ duplicate-definitions 0 0 0
    ⚠️ enum-value-formatting 0 7 6
    ❌ enum-value-other 25 0 0
    ❌ formatting-indent 7 0 0
    ❌ meta-enum-full-stop 70 0 0
    ❌ model-property-order 34 1 0
    ✅ model-structure 0 0 0
    ❌ no-must-word 96 0 0
    ❌ no-uppercase-rfc 73 0 0
    ❌ property-name-american-english 291 0 0
    ✅ schema-comment 0 0 0
    ✅ schema-draft 0 0 0
    ❌ schema-id-pattern 1 0 0
    ⚠️ title-formatting 0 1 0

    By File

    filePath error warning info
    ❌ schema/2.0/cyclonedx-2.0.schema.json 4 1 0
    ✅ schema/2.0/cyclonedx-api-2.0.schema.json 0 0 0
    ❌ schema/2.0/model/cyclonedx-ai-modelcard-2.0.schema.json 29 24 0
    ❌ schema/2.0/model/cyclonedx-annotation-2.0.schema.json 7 1 0
    ❌ schema/2.0/model/cyclonedx-behavior-2.0.schema.json 7 25 0
    ❌ schema/2.0/model/cyclonedx-blueprint-2.0.schema.json 40 39 0
    ❌ schema/2.0/model/cyclonedx-business-objective-2.0.schema.json 1 1 0
    ❌ schema/2.0/model/cyclonedx-certification-2.0.schema.json 1 0 0
    ❌ schema/2.0/model/cyclonedx-citation-2.0.schema.json 5 2 0
    ❌ schema/2.0/model/cyclonedx-common-2.0.schema.json 77 66 0
    ❌ schema/2.0/model/cyclonedx-component-2.0.schema.json 65 32 0
    ❌ schema/2.0/model/cyclonedx-composition-2.0.schema.json 7 3 1
    ❌ schema/2.0/model/cyclonedx-control-2.0.schema.json 4 0 0
    ❌ schema/2.0/model/cyclonedx-cryptography-2.0.schema.json 173 149 1
    ❌ schema/2.0/model/cyclonedx-data-2.0.schema.json 20 28 0
    ❌ schema/2.0/model/cyclonedx-declaration-2.0.schema.json 17 3 0
    ❌ schema/2.0/model/cyclonedx-definition-2.0.schema.json 1 0 0
    ❌ schema/2.0/model/cyclonedx-dependency-2.0.schema.json 3 2 0
    ❌ schema/2.0/model/cyclonedx-evidence-2.0.schema.json 16 23 0
    ❌ schema/2.0/model/cyclonedx-formulation-2.0.schema.json 56 31 0
    ❌ schema/2.0/model/cyclonedx-jss_X590_2023_10-2.0.schema.json 65 10 0
    ❌ schema/2.0/model/cyclonedx-license-2.0.schema.json 32 13 0
    ❌ schema/2.0/model/cyclonedx-metadata-2.0.schema.json 6 6 0
    ❌ schema/2.0/model/cyclonedx-party-2.0.schema.json 37 28 0
    ❌ schema/2.0/model/cyclonedx-patent-2.0.schema.json 11 11 0
    ❌ schema/2.0/model/cyclonedx-perspective-2.0.schema.json 11 22 0
    ❌ schema/2.0/model/cyclonedx-physical-2.0.schema.json 19 6 0
    ❌ schema/2.0/model/cyclonedx-profile-2.0.schema.json 1 0 0
    ❌ schema/2.0/model/cyclonedx-release-notes-2.0.schema.json 3 4 0
    ❌ schema/2.0/model/cyclonedx-requirement-2.0.schema.json 15 3 0
    ❌ schema/2.0/model/cyclonedx-risk-2.0.schema.json 16 19 0
    ❌ schema/2.0/model/cyclonedx-standard-2.0.schema.json 12 1 0
    ❌ schema/2.0/model/cyclonedx-threat-2.0.schema.json 36 20 1
    ❌ schema/2.0/model/cyclonedx-usecase-2.0.schema.json 8 2 0
    ❌ schema/2.0/model/cyclonedx-vulnerability-2.0.schema.json 44 26 3
    ❌ schema/2.0/model/cyclonedx-weakness-2.0.schema.json 1 2 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions