Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Integrate fortitude linter #1165

Open
2 tasks done
blaylockbk opened this issue Jan 7, 2025 · 1 comment
Open
2 tasks done

feat: Integrate fortitude linter #1165

blaylockbk opened this issue Jan 7, 2025 · 1 comment

Comments

@blaylockbk
Copy link

Is there an existing request for this?

  • I have searched the existing issues

I have tried the Pre-Release of the extension.

  • Feature is not present in the latest Pre-Release

Feature Request

The fortitude Fortran linter project just popped up in my GitHub feed. Could it be integrated in the VS Code extension?
https://github.com/PlasmaFAIR/fortitude

@blaylockbk
Copy link
Author

blaylockbk commented Jan 7, 2025

I have a very basic implementation using the tasks.json (this is my first time ever attempting such a thing, so I'm not sure if it is the best implementation). It would be amazing if the Modern Fortran extension could take care of this.

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Fortitude Check",
            "type": "shell",
            "command": "${env:HOME}/miniforge3/envs/fortran-tools/bin/fortitude", // Edit with path to your fortitude
            "args": [
                "check",
                "${fileDirname}"
            ],
            "runOptions": {
                "runOn": "folderOpen"
            },
            "problemMatcher": {
                "owner": "Fortitude",
                "fileLocation": "relative",
                "source": "Fortitude",
                "pattern": {
                    "regexp": "^(.*?):(\\d+):(\\d+):\\s(\\w+)\\s(.+)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "code": 4,
                    "message": 5
                }
            },
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "never",
                "panel": "shared"
            }
        }
    ]
}

I had to use the "Trigger Task on Save" extension to apply the linting whenever I save. This was added to my settings.json

"triggerTaskOnSave.tasks": {
        "Fortitude Check": ["*.f90"]
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant