Comments (4)
Hi @NadaMusthafa,
I’ve taken a look into this for you and have found a few problems with config files and paths both in csharpier
and megalinter
itself.
Taking megalinter
out of the equation for a moment, running csharpier
manually locally produces these results.
I’ve increased the indent to 8 spaces in the .editorconfig and .csharpierrc for testing purposes.
.editorconfig
only in the root of the directory ✅.csharpierrc
only in the root of the directory ✅.csharpierrc
in a config folder and use -config-path to point to it ✅.editorconfig
in a config folder and use -config-path to point to it ❌.editorconfig
in root and use --config-path to point to it ❌
This strongly suggests that csharpier doesn’t support using the --config-path
to point to a .editorconfig
. This would require logging an issue with csharpier directly if you don’t want to put an .editorconfig
in the root of your code. However its widely recognised as standard practice to place this type of file in the root, hence why I guess they probably don’t support it.
However while doing some testing for this issue I noticed that megalinter doesn’t work when overriding the configuration file name or path for a .csharpierrc
file. I’ve created a PR for this here #3664
Hope this helps,
Tom
from megalinter.
@NadaMusthafa please could you share an example of call to CSharpier with config file, so we can add its management in MegaLinter ?
from megalinter.
We used the following Settings:
Docker Image (latest): oxsecurity/megalinter-only-csharp_csharpier:beta_20240508-1708
Environment variables:
For MegaLinter:
MEGALINTER_FILES_TO_LINT : <list_of_comma_seperated_C#_files>
ENABLE_LINTERS : CSHARP_CSHARPIER
AZURE_COMMENT_REPORTER : false
For CSharpier:
CSHARP_CSHARPIER_CONFIG_FILE : '/config/.editorconfig'
CSHARP_CSHARPIER_CLI_LINT_MODE : list_of_files
With this basic setting, CSharpier throws an exception as shown.
from megalinter.
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale 🤖
label or comment on the issue.
from megalinter.
Related Issues (20)
- Powershell error table formatting issue HOT 1
- Devskim config ignored instead crawl-archives enabled by default HOT 1
- VSCODE error HOT 2
- Can EXTENDS be set in env? HOT 2
- TFLint - deprecated argument in ".tflint.hcl" HOT 6
- Action "Auto-Update Linters" is failing HOT 19
- Dependency "ip" needs to be replaced HOT 2
- Dependency Dashboard
- Add conftest integration HOT 2
- False negatives in v8r when validating mega-linter.yml HOT 4
- golangci-lint linter fails, as my go.mod has 1.22, but Alpine 3.19 has 1.21 HOT 4
- [Bug] Github Actions - 404 Network Errors Encountered with MegaLinter URLs HOT 3
- gherkin-linter in c_cpp flavor HOT 1
- Set env var via PRE_COMMAND HOT 4
- Making outbound network requests by default is very surprising behavior HOT 1
- Detect smallest flavour to improve performance? HOT 6
- Request new MegaLinter flavor
- Kotlin Detekt cli_lint_mode= list_of_files support HOT 2
- lightning-flow-scanner fails for salesforce flavor due to sf cli reporting update availablee HOT 2
- AzureCommentReporter.py permission issues on Azure DevOps HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from megalinter.