Skip to the content.

Trice Maintenance

Contents

1. Trice Project structure (Files and Folders)

Trice Root Folder File Details
.clang-format See GitHub Action clang-format.yml - Check C Code Formatting
.clang-format-ignore See GitHub Action clang-format.yml - Check C Code Formatting
.code_snippets Some legacy helper code for copying where to use
.editorconfig See GitHub Action clang-format.yml - Check C Code Formatting
.git/ Git repository metadata (exists locally after cloning; not part of the repository content)
.gitattributes See GitHub Action clang-format.yml - Check C Code Formatting
.github/ 📁 The .github Folder — Purpose and Contents
.gitignore git ignores these files
.goreleaser.yaml goreleaser configuration
.idea/ GoLand settings
lychee.toml GitHub Action link-check.yml - Broken Links Check
.markdownlint.yaml Cleaning the Sources
.markdownlintignore Cleaning the Sources
.vscode/ VS Code settings
AUTHORS.md contributors
CHANGELOG.md History
CODE_OF_CONDUCT.md How to communicate
CONTRIBUTING.md Helper
LICENSE.md MIT
README.md GitHub first page
_config.yml jekyll configuration
_test automatic target code tests
scripts/buildTriceTool.sh Build Trice tool from Go sources
scripts/_150_setup_build_environment.sh see inside
scripts/_280_format_c_code.sh See GitHub Action clang-format.yml - Check C Code Formatting
scripts/_300_clean_dsstore.sh Run to remove macOS artifacts
temp/log/coverage.out Go test coverage output
cmd/clang-filter ReadMe
cmd/trice Trice tool command Go sources
demoLI.json locally generated location information; see LI initialization
demoTIL.json Trice ID list example
dist/ local distribution files folder created by GoReleaser
docs Guide, User Manual, Reference Manual, and supporting material; start with the Trice Guide
examples/ example target projects
scripts/_310_refresh_trice_user_manual.sh Trice Reference Manual Maintenance (or any *.md file)
scripts/gitAddWorktreeFromGitLogLineData.sh helper to get easy a git worktree folder from any git hash for easy folder compare, see inside
scripts/gitAddWorktreesBetween.sh helper to get easy git worktree folders from any time range
scripts/gitLogWithBranches.sh helper to get easy a history view
go.mod Go modules file
go.sum Go modules sums
index.md Jekyll index site for README.md
internal/ Trice tool internal Go packages
pkg/ Trice tool common Go packages
scripts/_330_renew_ids_and_refresh_tests.sh deliberate legacy ID re-seeding and CGO harness refresh; see Target Tests
src/ C sources for trice instrumentation -> Add to target project
temp/ ignored local workspace for binary logfiles and other runtime artifacts like scripts/testAll.sh helper files under ./temp/log
testAll.log ignored local output of the last ./scripts/testAll.sh run
scripts/testAll.sh run all tests
third_party/ external components
trice_bindIDs_in_examples_and_test_folder.sh run the canonical Trice Bind workflow
scripts/_240_legacy_clean_ids.sh Cleaning the Sources Activating the Trice Cache
scripts/_120_setup_trice_environment.sh Cleaning the Sources Activating the Trice Cache
scripts/_230_legacy_insert_ids.sh Cleaning the Sources Activating the Trice Cache

(back to top)

2. 📁 The .github Folder — Purpose and Contents

GitHub automatically recognizes and uses everything contained inside the .github/ directory. This folder defines how the project behaves on GitHub: issue templates, automated workflows, labels, code scanning, greetings, and release automation. Details:

2.1. 📁 .github Root

It contains issue templates, labels, workflow automation, code scanning, linting, and the CI/CD release pipeline.

2.2. 📂 .github/workflows — GitHub Actions Workflows

The .github/workflows/ folder contains YAML descriptions for various actions, which will be triggered automatically on certain events or are started manually. Every yml file in this directory defines an automated process. These processes run on GitHub’s servers (CI/CD).

GitHub Action About
clang-format.yml GitHub Action clang-format.yml - Check C Code Formatting
codeql.yml GitHub Action codeql.yml - Static Code Analysis
coverage.yml GitHub Action coverage.yml - Test Coverage and Coveralls Integration
go.yml GitHub Action go.yml - Building and Testing Go Code
goreleaser.yml GitHub Action goreleaser.yml - Build & Pack Trice Distribution
label.yml GitHub Action label.yml - Automatic Labeling Rules
link-check.yml GitHub Action link-check.yml - Broken Links Check
shellcheck.yml GitHub Action shellcheck.yml - Catching Common Bash Scripts Bugs
shfmt.yml GitHub Action shfmt.yml - Ensure Consistent Shell Scripts Formatting
stale.yml GitHub Action stale.yml - Automatic Stale Issue Handling
superlinter.ym GitHub Action superlinter.yml - Ensure Consistent YAML and Markdown Formatting
pages.yml GitHub Action pages.yml - Creates The Trice GitHub Pages

2.3. GitHub Action clang-format.yml - Check C Code Formatting

2.4. GitHub Action codeql.yml - Static Code Analysis

2.5. GitHub Action coverage.yml - Test Coverage and Coveralls Integration

Trice uses Go’s built-in coverage tooling to measure how much of the Go codebase is exercised by automated tests.

Action Command
Generate a coverage profile locally go test ./... -covermode=atomic -coverprofile=./temp/log/coverage.out
Show results as list in terminal go tool cover -func=./temp/log/coverage.out
Show results colored file specific in browser go tool cover -html=./temp/log/coverage.out

Coverage badge:
The README displays the current coverage status for the default branch using the Coveralls badge:

[![Coverage Status](https://coveralls.io/repos/github/rokath/trice/badge.svg?branch=master)](https://coveralls.io/github/rokath/trice?branch=master)

This badge is updated whenever the CI workflow successfully uploads a new coverage report for the master branch.

2.6. GitHub Action go.yml - Building and Testing Go Code

2.7. GitHub Action goreleaser.yml - Build & Pack Trice Distribution

This workflow runs GoReleaser, the tool that builds and packages Trice for distribution.

See also Publish a release manually from a selected tag

2.8. GitHub Action label.yml - Automatic Labeling Rules

2.10. GitHub Action manual.ym - To Be Triggered Manually

A workflow that is designed to be triggered manually (similar to workflow_dispatch workflows). Common use cases:

2.11. GitHub Action shellcheck.yml - Catching Common Bash Scripts Bugs

Runs ShellCheck on all *.sh files, catching common bugs in Bash scripts.

2.12. GitHub Action shfmt.yml - Ensure Consistent Shell Scripts Formatting

Runs shfmt in diff mode on pull requests to ensure consistent formatting of shell scripts.

2.13. GitHub Action stale.yml - Automatic Stale Issue Handling

Automates stale issue handling. Function:

Mark stale issues and pull requests

2.14. GitHub Action superlinter.yml - Ensure Consistent YAML and Markdown Formatting

2.15. GitHub Action pages.yml - Creates The Trice GitHub Pages

This workflow creates the Trice github pages avaliable under rokath.github.io/trice/.

3. Trice Reference Manual Maintenance (or any *.md file)

4. Cleaning the Sources

In GitHub are some Actions defined. Some of them get triggered on a git push and perform some checks. To get no fail, some scripts should run before committing:

(back to top)