Skip to content

Commit

Permalink
Add linting instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanleung committed Nov 8, 2024
1 parent 33a3206 commit bd46b58
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/security_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ jobs:
run: bandit -r . -f custom
continue-on-error: true
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.20.0
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL'
scanners: 'vuln,secret,config'
- name: Upload Trivy scan results
uses: github/codeql-action/upload-sarif@v3
with:
Expand Down
47 changes: 47 additions & 0 deletions submodules/moragents_dockers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,50 @@ The `Delegator` will automatically:

1. **Ensure the `Delegator` can properly route requests** to the new agent.
2. **Test the agent's functionality** through the chat interface.
### 6. Code Quality & Linting
We use several tools to maintain code quality:
#### Python (Root & Agents)
1. **black** - Code formatting
2. **isort** - Import sorting
3. **flake8** - Style guide enforcement
#### Frontend
1. **eslint** - JavaScript/TypeScript linting
---
#### Installing & Running Linters
Linters will automatically run on staged files when you commit changes. You can also run them manually:
```bash
# In root directory
pip install -r requirements.txt
pre-commit install
# Run all pre-commit hooks on staged files
pre-commit run
# Run specific hooks on staged files
pre-commit run black
pre-commit run isort
pre-commit run flake8
# Run on specific files
pre-commit run --files path/to/file.py
# Run all hooks on all files (useful for initial setup)
pre-commit run --all-files
```
#### Skipping Hooks
In rare cases where you need to skip pre-commit hooks (not recommended):
```bash
git commit -m "message" --no-verify
```

0 comments on commit bd46b58

Please sign in to comment.