Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !2434

i#2369: add code style checks

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i2369-style-rules into master May 17, 2017
  • Overview 1
  • Commits 14
  • Pipelines 0
  • Changes 17

Adds new code style checks using the vera++ software for tokenizing.

Adds the following style checks:

  • Maximum line length
  • No tabs
  • No carriage returns
  • No NOCHECKIN
  • No trailing spaces
  • Break after return type
  • Braces around multi-line body
  • No space after a control keyword
  • Space after a call

Adds but disables a CamelCase rule as there are just too many exceptions.

The style checks are integrated into the build and run on each source file only when it's modified. The "style" build target can be used to force a check on every file.

Leaves the existing runsuite.cmake diff checks in place as the new vera++ checks only apply to C and C++ files.

Auto-installs vera++ on Travis to ensure we run the checks during CI.

Adds a test that vera++ finds these violations in an intentionally violating file.

Fixes #2369 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i2369-style-rules