Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ Welcome to cpp-linter! This guide will help you integrate C/C++ linting into you

## Choose Your Integration

<!-- markdownlint-disable MD033 -->

Select the method that best fits your development workflow:

<div class="grid cards" markdown>

- :material-github: **GitHub Actions**
- :material-github: **GitHub Actions**

---

Expand All @@ -18,8 +20,7 @@ Select the method that best fits your development workflow:

[Get started with GitHub Actions →](https://cpp-linter.github.io/cpp-linter-action/){ .md-button .md-button--primary }


- :material-git: **Pre-commit Hooks**
- :material-git: **Pre-commit Hooks**

---

Expand All @@ -28,9 +29,8 @@ Select the method that best fits your development workflow:
**Perfect for:** Catching issues before commits, local enforcement

[Get started with pre-commit →](https://github.com/cpp-linter/cpp-linter-hooks){ .md-button .md-button--primary }


- :fontawesome-brands-python: **Command Line**
- :fontawesome-brands-python: **Command Line**

---

Expand All @@ -40,7 +40,7 @@ Select the method that best fits your development workflow:

[Get started with cpp-linter package →](https://cpp-linter.github.io/cpp-linter/){ .md-button .md-button--primary }

- :simple-rust: **Command Line (Rust)**
- :simple-rust: **Command Line (Rust)**

---

Expand All @@ -56,25 +56,23 @@ Select the method that best fits your development workflow:

<div class="grid cards" markdown>

- :fontawesome-brands-github: **clang-tools-static-binaries**
- :fontawesome-brands-github: **clang-tools-static-binaries**

---

Distribution clang tools static binaries for various platforms

[Download from →](https://github.com/cpp-linter/clang-tools-static-binaries){ .md-button .md-button--primary }


- :fontawesome-brands-docker: **clang-tools-docker**
- :fontawesome-brands-docker: **clang-tools-docker**

---

Distribution clang tools Docker images for various platforms

[Download from →](https://github.com/cpp-linter/clang-tools-docker){ .md-button .md-button--primary }


- :fontawesome-brands-python: **clang-tools-wheels**
- :fontawesome-brands-python: **clang-tools-wheels**

---

Expand All @@ -84,21 +82,19 @@ Select the method that best fits your development workflow:

</div>



## Easy Installation

<div class="grid cards" markdown>

- :fontawesome-brands-python: **clang-tools-pip**
- :fontawesome-brands-python: **clang-tools-pip**

---

Easy installation of clang tools static binaries via pip

[Get started with clang-tools CLI →](https://cpp-linter.github.io/clang-tools-pip/){ .md-button .md-button--primary }

- :fontawesome-brands-python: **clang-tools-asdf**
- :fontawesome-brands-python: **clang-tools-asdf**

---

Expand Down
31 changes: 27 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ hide:
- toc
---

<!-- markdownlint-disable MD041 MD033 MD036 -->

<style>
/* this must be embedded in the page because
it removes the gap between header and hero */
.md-main__inner {
margin-top: 0;
}
.md-content__inner {
padding-top: 0;
}
.md-content__inner::before {
height: 0;
}
</style>
<div class="hero" markdown>

# C/C++ linting that simply works
Expand All @@ -22,19 +37,19 @@ hide:

<div class="grid cards" markdown>

- :material-chart-line: **Built in Open Source**
- :material-chart-line: **Built in Open Source**

---

Open-source and MIT-licensed. Bringing contributors together to empower impactful C/C++ lint projects in open source and beyond.

- :material-cog: **Zero Configuration**
- :material-cog: **Zero Configuration**

---

Works out of the box with sensible defaults. Advanced users can customize every aspect to match their coding standards.

- :material-devices: **Works Everywhere**
- :material-devices: **Works Everywhere**

---

Expand Down Expand Up @@ -138,7 +153,15 @@ hide:
- id: clang-format
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
- id: clang-tidy
args: [--checks='boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*']
args:
Copy link
Contributor

@shenxianpeng shenxianpeng Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The yaml format seems incorrect if users just copy and use it. Maybe id and args need to be aligned

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to YAML specs

list-name: [item]
# is equivalent to
list-name:
  - item

I hadn't noticed the misaligned indent. That should be uniformed.

- --checks='boost-*
- bugprone-*
- performance-*
- readability-*
- portability-*
- modernize-*
- clang-analyzer-*
- cppcoreguidelines-*'
```

=== "Command Line"
Expand Down
53 changes: 34 additions & 19 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ th {
background-color: var(--md-default-fg-color--lightest);
}

:root > * {
--cpp-linter-logo-color-green: #40b385;
--cpp-linter-logo-color-yellow: #ffc20a;
}

/* Hero section styling */
.hero {
text-align: center;
padding: 4rem 0;
background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
background-size: 200% 200%;
animation: gradientShift 8s ease infinite;
color: white;
margin: -1.5rem -1.5rem 3rem -1.5rem;
/* background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--cpp-linter-logo-color-green) 100%); */
/* background-size: 200% 200%; */
/* animation: gradientShift 8s ease infinite; */
background: var(--md-primary-fg-color);
color: var(--md-primary-bg-color);
margin: 0 -1em 3rem -1em;
border-radius: 0 0 1rem 1rem;
}

Expand All @@ -19,17 +25,39 @@ th {
font-weight: 700;
margin-bottom: 1rem;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
text-align: center;
color: unset;
}

.hero p {
font-size: 1.2rem;
margin-bottom: 2rem;
opacity: 0.9;
max-width: 600px;
width: 65%;
margin-left: auto;
margin-right: auto;
}

.hero .md-button:hover {
border: 2px solid black;
}

.hero .md-button {
background: var(--cpp-linter-logo-color-green);
color: black;
border: none;
}

.hero .md-button:hover {
background: var(--cpp-linter-logo-color-yellow);
color: black;
border: none;
}

.md-typeset .md-button:hover {
color: black;
}

@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
Expand Down Expand Up @@ -184,19 +212,6 @@ th {
}
}

.md-header {
background-color: #4051b5;
}

/* Make navigation tabs match header color */
.md-tabs {
background-color: #4051b5;
}

.md-tabs__list {
background-color: #4051b5;
}

/* Ensure tab items have proper contrast */
.md-tabs__item {
background-color: transparent;
Expand Down
8 changes: 5 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ site_name: "cpp-linter"
site_description: "Documentation for the cpp-linter organization."
site_url: "https://cpp-linter.github.io/"
repo_url: https://github.com/cpp-linter

repo_name: "cpp-linter"
copyright: "© 2021-2025, cpp-linter"

nav:
Expand All @@ -11,6 +11,8 @@ nav:
- Discussion: discussion.md
# - Blog:
# - blog/index.md
exclude_docs: |
blog/**

theme:
name: material
Expand All @@ -35,7 +37,7 @@ theme:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: blue
primary: indigo
accent: cyan
toggle:
icon: material/lightbulb-outline
Expand All @@ -44,7 +46,7 @@ theme:
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: blue
primary: indigo
accent: cyan
toggle:
icon: material/lightbulb
Expand Down