当前位置:网站首页>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 .

边栏推荐
- Gbase 8s stored procedure syntax structure
- Le chemin de l'apprentissage immutable - - Adieu à la copie traditionnelle
- 【无标题】
- OOP vector addition and subtraction (friend + copy construction)
- Wechat likes to pay attention to the solution of invalid automatic reply
- 第九章 APP项目测试(2) 测试工具
- 领导:谁再用 Redis 过期监听实现关闭订单,立马滚蛋!
- "Daily practice, happy water" 1108 IP address invalidation
- Blob page in gbase 8s
- great! Auto like, I use pyautogui!
猜你喜欢

小白一键重装官网下载使用方法

leetcode1221. 分割平衡字符串

Simple text analysis of malicious samples - Introduction

CTF_ Web: Advanced questions of attack and defense world expert zone WP (15-18)

dotnet-exec 0.4.0 released

第九章 APP项目测试(2) 测试工具

js的arguments

Concat() in JS

CTF_ Web: Changan cup-2021 old but a little new & asuka

Method of opening data recovery of solid state disk
随机推荐
初识 Flutter 的绘图组件 — CustomPaint
Huawei Hongmeng development lesson 4
Get to know the drawing component of flutter - custompaint
The consciousness of a programmer
Cnpm: unable to load file c:\users\administrator\appdata\roaming\npm\cnpm PS1 because running scripts is prohibited on this system.
Efficient NoSQL database service Amazon dynamodb experience sharing
Web3 DApp用户体验最佳实践
CTF_ Web: deserialization of learning notes (II) CTF classic test questions from shallow to deep
STM32的DMA双缓冲模式详解
Record small knowledge points
php封装curl发送get、post请求方法,并使用
Calculate student grade (virtual function and polymorphism)
Basic introduction of gbase 8s blocking technology
Successfully solved: selenium common. exceptions. TimeoutException: Message: timeout: Timed out receiving message from
GBASE 8s存儲過程語法結構
Gbase 8s index b+ tree
Write shell script error summary
Use text analysis to identify the main gender in a text
Use of deferred environment variable in gbase 8s
Cannot import name 'escape' from 'jinja2' [solved successfully]