Skip to content

Commit 81bc915

Browse files
docs: finalize README and CONTRIBUTING for initial release
This commit restores the final, polished versions of README.md and CONTRIBUTING.md that were lost after a previous git rebase was aborted. Includes the 'Why Privlog?', 'Quick Example', and 'Status' sections in the README, as well as the 'Development Setup' and 'Contribution Guidelines' in CONTRIBUTING.md.
1 parent cfa20e1 commit 81bc915

2 files changed

Lines changed: 59 additions & 6 deletions

File tree

CONTRIBUTING.md

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
11
# Contributing to Privlog
22

3-
This guide is for developers who want to contribute to the `privlog` project. It explains the project's architecture and where key logic lives.
3+
Thank you for your interest in contributing to Privlog.
4+
5+
This guide explains the project's architecture, development workflow, and where key logic lives.
6+
7+
---
8+
9+
## 1. Project Purpose
10+
11+
Privlog is a privacy-aware linter for Python. The command-line interface is implemented using Typer, while the analysis engine combines Semgrep rules with a Python AST-based scanner.
412

513
---
614

7-
## 1. Purpose of this project
15+
## 2. Development Setup
16+
17+
To work on Privlog locally:
18+
19+
```bash
20+
git clone https://github.com/privlog-dev/privlog.git
21+
cd privlog
22+
23+
python -m venv .venv
24+
source .venv/bin/activate
25+
26+
pip install -e .
27+
```
28+
29+
This installs Privlog in editable mode so code changes immediately affect the CLI.
830

9-
- **`privlog`** is a privacy-aware linter for Python that uses a Typer CLI. Its analysis is powered by a hybrid engine combining pattern-based Semgrep rules with a high-precision, language-aware AST-based scanner.
31+
You can verify the installation by running a scan on the project itself:
32+
```bash
33+
privlog .
34+
```
1035

1136
---
1237

13-
## 2. Key files and modules
38+
## 3. Key files and modules
1439

1540
- `pyproject.toml`
1641
- **Purpose:** Defines project metadata, dependencies, and the `privlog` entry point. It is also the location for user-defined configuration under the `[tool.privlog]` section.
@@ -22,7 +47,7 @@ This guide is for developers who want to contribute to the `privlog` project. It
2247
- The main Python package directory.
2348

2449
- `privlog/cli.py`
25-
- **Purpose:** The main entry point for the CLI application.
50+
- **Purpose:** The main Typer entry point for the CLI application.
2651
- **Responsibilities:** Defines commands and arguments using Typer. Implements the `--warnings`/`-w` flag and filters findings based on severity.
2752

2853
- `privlog/runner.py`
@@ -55,3 +80,31 @@ This guide is for developers who want to contribute to the `privlog` project. It
5580
- `privlog/rules/privlog.yml`
5681
- **Purpose:** The core Semgrep ruleset, which complements the AST checker.
5782
- **Responsibilities:** Defines rules for detecting PII, secrets, and unsafe logging patterns.
83+
84+
---
85+
86+
## 4. Contribution Guidelines
87+
88+
When contributing code:
89+
90+
- Keep the CLI interface stable
91+
- Maintain clear error messages and finding codes
92+
- Prefer AST-based detection when accuracy matters
93+
- Keep rules deterministic and easy to understand
94+
95+
Before submitting a pull request:
96+
97+
- Ensure the CLI runs correctly
98+
- Verify that findings behave as expected
99+
- Update documentation if behavior changes
100+
101+
### Submitting Pull Requests
102+
103+
1. Fork the repository.
104+
2. Create a feature branch (`git checkout -b feature/AmazingFeature`).
105+
3. Make your changes.
106+
4. Commit your changes (`git commit -m 'Add some AmazingFeature'`).
107+
5. Push to the branch (`git push origin feature/AmazingFeature`).
108+
6. Open a new Pull Request.
109+
110+
Clear explanations and examples are always appreciated.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pip install privlog
6363

6464
## Usage
6565

66-
Once installed, run the `privlog` command on your project directory.
66+
Once installed, you can run `privlog` against a specific path, or run it by itself to scan the current directory.
6767

6868
### Default (Errors Only)
6969

0 commit comments

Comments
 (0)