FSharpLint
FSharpLint copied to clipboard
Doesnt seem to run in github action
Description
I am running lint in a CI pipeline in a github action, but it reports none of the warnings I get on my local machine - it reports zero warnings.
Repro steps
Please provide the steps required to reproduce the problem
name: ModelRegistry
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
defaults:
run:
working-directory: src/ModelRegistry
jobs:
qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install tools
run: make install
- name: Build
run: make build
- name: Test
run: make test
- name: Validate format
run: make check-format
and relevant make command:
.PHONY: check-format
check-format: ## check if code is correctly formatted
dotnet fantomas --check .
dotnet fsharplint lint ModelRegistry.sln
ls
(the ls to check the files exist in the action).
Expected behavior
From my machine:
❯ make check-format
dotnet fantomas --check .
dotnet fsharplint lint ModelRegistry.sln
[...]
========== Summary: 32 warnings ==========
make: *** [Makefile:16: check-format] Error 255
Actual behavior
Run make check-format
dotnet fantomas --recurse --check .
dotnet fsharplint lint ModelRegistry.sln
========== Summary: 0 warnings ==========
ls
[...]
ModelRegistry.sln
[...]
Known workarounds
N/A
Related information
Everything should be in github action yml content.
- linter Version: 0.21.3
How are you installing fsharplint?
How are you installing fsharplint?
like this
dotnet tool install dotnet-fsharplint
@C0DK maybe this is the culprit?:
defaults: run: working-directory: src/ModelRegistry
It's the only difference I can think of between your local env and CI. (Even if I'm right, I know that FSharpLint should probably throw a better error here, but let's find the real issue first.)
@C0DK maybe this is the culprit?:
defaults: run: working-directory: src/ModelRegistry
It's the only difference I can think of between your local env and CI. (Even if I'm right, I know that FSharpLint should probably throw a better error here, but let's find the real issue first.)
The makefile is in that working directory, so that would be why :D
But how about the .sln file, where does it live?
Same folder. it's a mono repo of mulitple projects.
@C0DK can I have access to the repo?