Comments (9)
谢谢建议,确实可以考虑,同时也对tools目录下的脚本进行整理,做得更好
from rt-thread.
目前仓库支持clang-format自动格式的,一般的ide都支持clang-format,比如vscode只要配置下即可在保存的时候自动格式化。
from rt-thread.
目前仓库支持clang-format自动格式的,一般的ide都支持clang-format,比如vscode只要配置下即可在保存的时候自动格式化。
请问用这个 clang-format 的效果是否和 https://github.com/mysterywolf/formatting 的一致?如果使用 clang-format 是需要人手动在 ide 里配置的,如何保证大家的行动一致并符合 rtt 的要求呢?
from rt-thread.
目前仓库支持clang-format自动格式的,一般的ide都支持clang-format,比如vscode只要配置下即可在保存的时候自动格式化。
请问用这个 clang-format 的效果是否和 https://github.com/mysterywolf/formatting 的一致?如果使用 clang-format 是需要人手动在 ide 里配置的,如何保证大家的行动一致并符合 rtt 的要求呢?
两者功能有重叠,但是有些差异,其中https://github.com/mysterywolf/formatting 支持简单的代码格式化以及修改版权信息等功能,clang-format是强大的代码格式化工具,比如formatting强大很多,平时pr代码推荐使用clang-format。修改版权信息和日期是发布版本的事情。
from rt-thread.
Anyway,我个人觉得一个仓库自带的,立即可用的类似 linux 的 checkpatch 的工具也许会更方便大家检查。(formatting 工具还需要另外下载这个是我一开始觉得不方便的地方)
如果觉得我这个建议没有必要,请 feel free close this issue.
Regards.
from rt-thread.
感觉是有必要,可以考虑的。 @mysterywolf 觉得呢?
from rt-thread.
clang-format 是代码格式化,formating严格来说应该说是代码检查,因为提交代码的时候更多只能说是做代码检查的工作,而不是说帮助进行代码格式化。formating偏向机器人,所以机器人是不修改代码的。
from rt-thread.
建议在仓库中,加入一个.clang-format
文件,提交 pr 前用 clang-format 代码化一来代码,这样代码风格就一致了
from rt-thread.
没细看,原来已经有 .clang-format 文件了
from rt-thread.
Related Issues (20)
- 在rtthread studio建立v5.1.0的工程不能用
- [bsp/rk3568]:使用v5.1.0版本无法正常启动 HOT 4
- qemu-vexpress-a9 中使用c++出错 HOT 4
- rt_object_get_information函数优化问题 HOT 5
- n32g452xx BSP包中关于USART2重映射2的宏定义编译报错问题
- pm.c中notify、_pm_device_suspend/_pm_device_resume传参不对称,是bug还是设计如此?
- [Bug] calc_random() 返回应该是有符号随机数
- [Bug] bsp/cvitek, adc driver is not completed HOT 3
- [Feature] Add milk-v duo bsp to ci-build
- [Bug] pm.c文件中函数_pm_change_sleep_mode()调用函数rt_timer_check()存在问题 HOT 2
- [Bug] musl gcc can not work HOT 9
- [Feature] 优化 cvitek 固件打包的处理 HOT 4
- [Bug] Not compiled for Allwinner D1H.
- [Bug] RTT Studio不支持DefineGroup中LOCAL_CCFLAGS等编译选项
- POSIX接口测试
- [Bug] bsp/cvitek 大核无法支持 float 指令 HOT 6
- 官方ART-Pi media io不工作 HOT 2
- _thread_detach_from_mutex 释放互斥量
- [Bug] musl gcc link error HOT 2
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 rt-thread.