Comments (5)
Collection expressions are supported, you must be on an old version of csharpier. Note that csharpier is versioned separately from the ide extensions and updating the extension does not actually update csharpier.
from csharpier.
I'm using dotnet 8.0.1 and cshapier 1.6.0
same error
string[] test = ["1", "2"];
Failed to compile so was not formatted.\n (40,29): error CS1525: Invalid expression term '['\n"
If I use this string[] test = new string[] { "1", "2" };
, there is no problem.
from csharpier.
I use this command dotnet csharpier --version
to get the version.
It is 0.22.1.
I have installed vs code extension cshapier 1.6.0.
I see the latest version is 0.28 at gitlab.
How can I update the version to 0.28?
from csharpier.
Finally, I know my problem.
I use wrong version at .config/dotnet-tools.json
{
"version": 1,
"isRoot": true,
"tools": {
"CSharpier": {
"version": "0.28.0",
"commands": [
"dotnet-csharpier"
]
}
}
}
I guess someone is like me to follow this link to setup husky
https://csharpier.com/docs/Pre-commit
Then, we use wrong version 0.22.1 and it is a very old version.
Maybe better to use X.XX.X and remind others to input latest version.
from csharpier.
I updated the doc to remove the hardcoded version number.
from csharpier.
Related Issues (20)
- System.Text.Json has high severity vulnerability HOT 1
- Invalid formatting when parameters have attributes with many values HOT 2
- CSharpier strips intentional empty lines between `using` groups HOT 3
- Invalid blank line being added with lambda returning collection expression
- Ignore VSCode Error Notifications HOT 2
- Code inside interpolated raw literals is not formatted HOT 3
- Look into the failures in the "format repositories" action
- C# 13 & dotnet 9
- Rework the CLI to properly use commands + arguments. HOT 2
- Process cannot access the file "....net8.0\any\server.log" while running multiple extensions. HOT 1
- Sorting of usings with underscore differs from Visual Studio HOT 1
- CSharpier Server - should have some form of log cleanup. HOT 3
- Extra new line between cast and collection expression.
- Plugin fails without CSharpier.MSBuild reference HOT 2
- Rider plugin not running, CustomPathInstaller.validateInstall returning null HOT 2
- CSharpier not formatting on save HOT 1
- CSharpier Process Error in VS2022 HOT 3
- `csharpier-ignore` comment not respected in certain scopes HOT 1
- Comments don't follow tabs indent style HOT 2
- VS Code extension doesn't find installed version of CSharpier, fails silently
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 csharpier.