Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cb40e8f
Fix test compilation errors
krystophny Aug 4, 2025
6cc99e9
Remove debug programs from test compilation
krystophny Aug 4, 2025
f499c43
Fix all failing tests and implement proper test infrastructure
krystophny Aug 4, 2025
ffc3ae8
Convert all remaining problematic test files to testdrive modules
krystophny Aug 4, 2025
87a1434
Fix formatter TODO: implement file reading and formatting
krystophny Aug 4, 2025
4beaf61
Fix formatter TODO: implement range-specific formatting
krystophny Aug 4, 2025
6695578
Fix common TODO: implement proper path normalization
krystophny Aug 4, 2025
2502351
Fix diagnostics TODO: implement sorting by file and line number
krystophny Aug 4, 2025
22bf177
Implement SARIF format conversion for diagnostic collection
krystophny Aug 4, 2025
7aa400a
Replace error stop statements with proper error handling in tests
krystophny Aug 4, 2025
f100630
Implement JSON and SARIF output formats in CLI
krystophny Aug 4, 2025
50b1c0a
Fix direct ast_arena import in dead code detection module
krystophny Aug 4, 2025
c0a224b
Implement basic placeholder for F001 rule implementation
krystophny Aug 4, 2025
df7f604
RESTORE GIGANTIC TEST SUITE\! 🎉
krystophny Aug 4, 2025
55a95f7
Implement dead code detection using fortfront AST (55.6% tests passing)
krystophny Aug 4, 2025
f1b783f
Implement dependency analysis infrastructure using fortfront AST
krystophny Aug 4, 2025
5dcc730
Fix dependency analysis interface mismatch for test compatibility
krystophny Aug 4, 2025
20b2c15
Improve file watching pattern matching for wildcard patterns
krystophny Aug 4, 2025
b6daba8
Implement working configuration reload system with 95% test coverage
krystophny Aug 4, 2025
9d8cb6a
Implement F-rules with fortfront AST and achieve 100% enhanced style …
krystophny Aug 4, 2025
69d0c3d
Implement P-rules with fortfront AST for performance analysis
krystophny Aug 4, 2025
98719bd
Fix tool integration configuration discovery failures
krystophny Aug 4, 2025
a0b4ee0
Implement working incremental analysis using fortfront AST
krystophny Aug 4, 2025
bd3cf05
Enhance LSP hover with fortfront AST-based semantic analysis
krystophny Aug 4, 2025
ab3d201
Complete auto-fix functionality, output formats, parallel execution, …
krystophny Aug 5, 2025
ddb6a74
Complete documentation update and cleanup for v0.1.0 release
krystophny Aug 5, 2025
f23220e
Fix CI: Use fortfront GitHub repository instead of local path
krystophny Aug 5, 2025
a5166bd
Fix CI: Replace failing setup-fpm action with direct download
krystophny Aug 5, 2025
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
160 changes: 135 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,28 @@ jobs:
compiler: gcc
version: ${{ matrix.gcc-version }}

- name: Setup fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup fpm (Linux)
if: runner.os == 'Linux'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-linux-x86_64
chmod +x fpm-0.10.0-linux-x86_64
sudo mv fpm-0.10.0-linux-x86_64 /usr/local/bin/fpm

- name: Setup fpm (macOS)
if: runner.os == 'macOS'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-macos-x86_64
chmod +x fpm-0.10.0-macos-x86_64
sudo mv fpm-0.10.0-macos-x86_64 /usr/local/bin/fpm

- name: Setup fpm (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Invoke-WebRequest -Uri https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-windows-x86_64.exe -OutFile fpm.exe
New-Item -ItemType Directory -Force -Path C:\fpm
Move-Item -Path fpm.exe -Destination C:\fpm\fpm.exe
echo "C:\fpm" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Cache dependencies
uses: actions/cache@v3
Expand All @@ -55,7 +73,9 @@ jobs:
run: fpm build --verbose

- name: Run tests
run: fpm test --verbose
run: |
export OMP_NUM_THREADS=24
fpm test --verbose

- name: Run self-check (fluff on itself)
run: |
Expand Down Expand Up @@ -85,10 +105,28 @@ jobs:
compiler: gcc
version: 11

- name: Setup fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup fpm (Linux)
if: runner.os == 'Linux'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-linux-x86_64
chmod +x fpm-0.10.0-linux-x86_64
sudo mv fpm-0.10.0-linux-x86_64 /usr/local/bin/fpm

- name: Setup fpm (macOS)
if: runner.os == 'macOS'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-macos-x86_64
chmod +x fpm-0.10.0-macos-x86_64
sudo mv fpm-0.10.0-macos-x86_64 /usr/local/bin/fpm

- name: Setup fpm (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Invoke-WebRequest -Uri https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-windows-x86_64.exe -OutFile fpm.exe
New-Item -ItemType Directory -Force -Path C:\fpm
Move-Item -Path fpm.exe -Destination C:\fpm\fpm.exe
echo "C:\fpm" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build fluff
run: fpm build
Expand Down Expand Up @@ -123,10 +161,28 @@ jobs:
compiler: gcc
version: 11

- name: Setup fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup fpm (Linux)
if: runner.os == 'Linux'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-linux-x86_64
chmod +x fpm-0.10.0-linux-x86_64
sudo mv fpm-0.10.0-linux-x86_64 /usr/local/bin/fpm

- name: Setup fpm (macOS)
if: runner.os == 'macOS'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-macos-x86_64
chmod +x fpm-0.10.0-macos-x86_64
sudo mv fpm-0.10.0-macos-x86_64 /usr/local/bin/fpm

- name: Setup fpm (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Invoke-WebRequest -Uri https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-windows-x86_64.exe -OutFile fpm.exe
New-Item -ItemType Directory -Force -Path C:\fpm
Move-Item -Path fpm.exe -Destination C:\fpm\fpm.exe
echo "C:\fpm" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build fluff (optimized)
run: fpm build --profile release
Expand Down Expand Up @@ -182,10 +238,28 @@ jobs:
compiler: gcc
version: 11

- name: Setup fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup fpm (Linux)
if: runner.os == 'Linux'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-linux-x86_64
chmod +x fpm-0.10.0-linux-x86_64
sudo mv fpm-0.10.0-linux-x86_64 /usr/local/bin/fpm

- name: Setup fpm (macOS)
if: runner.os == 'macOS'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-macos-x86_64
chmod +x fpm-0.10.0-macos-x86_64
sudo mv fpm-0.10.0-macos-x86_64 /usr/local/bin/fpm

- name: Setup fpm (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Invoke-WebRequest -Uri https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-windows-x86_64.exe -OutFile fpm.exe
New-Item -ItemType Directory -Force -Path C:\fpm
Move-Item -Path fpm.exe -Destination C:\fpm\fpm.exe
echo "C:\fpm" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build fluff
run: fpm build
Expand Down Expand Up @@ -220,10 +294,28 @@ jobs:
compiler: gcc
version: 11

- name: Setup fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup fpm (Linux)
if: runner.os == 'Linux'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-linux-x86_64
chmod +x fpm-0.10.0-linux-x86_64
sudo mv fpm-0.10.0-linux-x86_64 /usr/local/bin/fpm

- name: Setup fpm (macOS)
if: runner.os == 'macOS'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-macos-x86_64
chmod +x fpm-0.10.0-macos-x86_64
sudo mv fpm-0.10.0-macos-x86_64 /usr/local/bin/fpm

- name: Setup fpm (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Invoke-WebRequest -Uri https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-windows-x86_64.exe -OutFile fpm.exe
New-Item -ItemType Directory -Force -Path C:\fpm
Move-Item -Path fpm.exe -Destination C:\fpm\fpm.exe
echo "C:\fpm" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build fluff
run: fpm build
Expand Down Expand Up @@ -257,10 +349,28 @@ jobs:
compiler: gcc
version: 11

- name: Setup fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup fpm (Linux)
if: runner.os == 'Linux'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-linux-x86_64
chmod +x fpm-0.10.0-linux-x86_64
sudo mv fpm-0.10.0-linux-x86_64 /usr/local/bin/fpm

- name: Setup fpm (macOS)
if: runner.os == 'macOS'
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-macos-x86_64
chmod +x fpm-0.10.0-macos-x86_64
sudo mv fpm-0.10.0-macos-x86_64 /usr/local/bin/fpm

- name: Setup fpm (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Invoke-WebRequest -Uri https://github.com/fortran-lang/fpm/releases/download/v0.10.0/fpm-0.10.0-windows-x86_64.exe -OutFile fpm.exe
New-Item -ItemType Directory -Force -Path C:\fpm
Move-Item -Path fpm.exe -Destination C:\fpm\fpm.exe
echo "C:\fpm" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build release version
run: fpm build --profile release
Expand Down
82 changes: 82 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Changelog

All notable changes to fluff will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2025-01-08

### Added
- Initial release of fluff - A Modern Fortran Linter and Formatter
- **22 Linting Rules**:
- F001-F015: Style and formatting rules
- P001-P007: Performance optimization rules
- **Auto-fix Support** for F001, F002, F008, P004
- **Multiple Output Formats**:
- JSON with pretty printing
- SARIF v2.1.0 for security tools
- XML (generic, JUnit, CheckStyle)
- GitHub Actions annotations
- **Language Server Protocol (LSP)**:
- Full LSP server implementation
- Hover information with type details
- Code actions and quick fixes
- Go to definition support
- Real-time diagnostics
- **Performance Features**:
- OpenMP-based parallel rule execution
- Incremental analysis for changed files
- Smart caching system
- File watching with hot reload
- **Tool Integrations**:
- GitHub Actions with annotations
- Pre-commit hook support
- Editor plugins (VSCode, Vim, Emacs)
- CI/CD ready with proper exit codes
- **Advanced Analysis**:
- Dead code detection
- Dependency analysis with circular detection
- Control flow analysis
- Type inference via fortfront
- **Configuration**:
- Namelist-based configuration
- TOML configuration support
- Per-file ignore patterns
- Environment variable overrides
- **Developer Features**:
- Comprehensive API for custom rules
- Metrics and statistics collection
- Multiple severity levels
- Fix suggestion infrastructure

### Known Issues
- fortfront memory corruption in some complex scenarios (workarounds in place)
- Template error handling test failure (minor test design issue)

### Dependencies
- fortfront v0.1.0+ (Fortran AST library)
- Fortran stdlib
- json-fortran 8.3.0
- OpenMP 3.0+

### Contributors
- Christopher Albert (@krystophny)

---

## Future Releases

### [Planned for 0.2.0]
- Additional rule categories (C-rules for correctness, S-rules for security)
- Enhanced auto-fix coverage for all rules
- Improved fortfront integration with memory fixes
- Configuration profiles (strict, performance, legacy)
- Project-wide refactoring capabilities

### [Planned for 0.3.0]
- Cross-file analysis improvements
- Symbol renaming across projects
- Integration with popular build systems
- Performance profiling rules
- Custom rule plugin system
Loading
Loading