[util] Catch more problems with commit lint

This improves the commit lint script to catch a couple more problems:

* The commit message is now checked:
  * We require an empty second line, separating the summary (first line)
    from the optional long description (lines 3-). (In fact, git
    shortlog assumes that everything before the first empty line is the
    summary, leading to a summary line containing the whole commit
    message if there's no empty line in between.)
  * The summary line should not be overly long. The often-recommended
    limit is 50 characters, but there is no hard rule. This commit enforces
    a 100 character limit on the first line, which should be lenient
    enough.
* There's now a warning if the author name does not contain a space.
  That typically indicates that the user didn't set his real name but a
  GitHub username as name. It's not an error because there's no
  universal rule that names must consist of multiple words.

In addition to these functional changes, the implementation switched to
use GitPython, avoiding manually calling git and parsing its output.

Note: Merge commits are not checked in our CI setup. When Azure
Pipelines runs, it tests the PR merge into origin/master. The merge
commit is added by GitHub with author information as set in the GitHub
UI: the full name (if set) or the GitHub username, and the public email
address. This commit will not appear in our repository when doing
"rebase merges". Checking merge commits would check something other than
the commits as we ultimately see them in our repo, raising false alarm.
3 files changed
tree: f65744c56988d40c0f2080aabdf01257483593d2
  1. doc/
  2. hw/
  3. sw/
  4. util/
  5. .clang-format
  6. .gitignore
  7. .style.yapf
  8. azure-pipelines.yml
  9. CONTRIBUTING.md
  10. index.md
  11. LICENSE
  12. python-requirements.txt
  13. README.md
  14. sitemap.md
README.md

OpenTitan

This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository.

Documentation

The project contains comprehensive documentation of all IPs and tools. You can either access it online or build it locally by following the steps below.

  1. Ensure that you have the required Python modules installed (to be executed in the repository root):
$ sudo apt install python3 python3-pip
$ pip3 install --user -r python-requirements.txt
  1. Execute the build script:
$ ./util/build_docs.py --preview

This compiles the documentation into ./opentitan-docs and starts a local server, which allows you to access the documentation at http://127.0.0.1:5500.

How to contribute

Have a look at CONTRIBUTING.md for guidelines how to contribute code to this repository.

Licensing

Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).