当前位置:网站首页>In Net 6 using dotnet format formatting code
In Net 6 using dotnet format formatting code
2022-06-25 04:46:00 【Dotnet cross platform】
I have to admit , stay code review When , I spent a lot of time studying C# Code format problem for , This is not a very meaningful job , I should focus on other things , Instead of watching colleagues forget to format the code , Or a code editor that uses different rules .
Now? , We can use dotnet format Check for code format problems . This is a .NET 6 New functions ,.NET CLI Introduced dotnet format command , And it is a built-in command .
It should be noted that , If you install it .NET 6 Preview 7 SDK Or later , You should use dotnet-format instead of dotnet format, Otherwise, running the command will report an error .
How to use ?
Format all the code in the solution :
dotnet format ./solution.slnCode to format a single item
dotnet format ./src/application.csprojVerify that all code is in the correct format :
dotnet format --verify-no-changesformat src and tests All code in the directory , And exclude src/submodule-a Directory code :
dotnet format --include ./src/ ./tests/ --exclude ./src/submodule-a/Format and output details
dotnet-format -v diagFormat and record the report to a file
dotnet format --report ./report.jsonmore dotnet-format Information about , You can see the link below
https://github.com/dotnet/format
END
Made a .NET The learning website , It covers Distributed systems , Data structure and algorithm , Design patterns , operating system , Computer network, etc , reply dotnet Get the website address , reply Interview questions obtain .NET Interview questions .

边栏推荐
- [image fusion] image fusion based on MATLAB directional discrete cosine transform and principal component analysis [including Matlab source code 1907]
- MySQL concept and operation (III)
- Cascading deletion of gbase 8s
- "Daily practice, happy water" 1108 IP address invalidation
- After the newly assigned variable of the applet is modified, the original variable will also be modified
- 【无标题】
- 领导:谁再用 Redis 过期监听实现关闭订单,立马滚蛋!
- OOP栈类模板(模板+DS)
- 【FLink】access closed classloader classloader.check-leaked-classloader
- Concat() in JS
猜你喜欢

Xiaobai learns MySQL - Statistical 'opportunism'

Unity Quad culls shaders with back faces and transparent parts

Web3 DApp用户体验最佳实践

Simple text analysis of malicious samples - Introduction

Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影

Méthode de récupération des données d'ouverture du disque dur à l'état solide

深度学习——几种学习类型
![[image fusion] image fusion based on MATLAB directional discrete cosine transform and principal component analysis [including Matlab source code 1907]](/img/a1/f7a35a04e180e89d7f2fdbf89c1160.jpg)
[image fusion] image fusion based on MATLAB directional discrete cosine transform and principal component analysis [including Matlab source code 1907]

【图像融合】基于matlab方向离散余弦变换和主成分分析图像融合【含Matlab源码 1907期】

机器学习深度学习——向量化
随机推荐
Records of ros2/dds/qos/ topics
Gbase 8s parallel operation problem scenario description
Join() in JSZ
Which programming language is the most cumbersome to implement Hello world?
【图像融合】基于matlab方向离散余弦变换和主成分分析图像融合【含Matlab源码 1907期】
Separation of storage and computing in Dahua cloud native database
Immutable學習之路----告別傳統拷貝
小白一键重装官网下载使用方法
《牛客刷verilog》Part I Verilog快速入门
Region of Halcon: generation of multiple regions (3)
CTF_ Web: Advanced questions of attack and defense world expert zone WP (19-21)
Method of opening data recovery of solid state disk
The solution of wechat applet switchtab unable to take parameters
Cascading deletion of gbase 8s
坐标系左乘右乘
JDBC (IV)
【FLink】access closed classloader classloader.check-leaked-classloader
多睡觉,能减肥,芝加哥大学最新研究:每天多睡1小时,等于少吃一根炸鸡腿...
Upgrade PHP to php7 X (III) failure of wechat payment callback
Trigger for gbase 8s