Giter Site home page Giter Site logo

Comments (9)

BernardXiong avatar BernardXiong commented on July 22, 2024

谢谢建议,确实可以考虑,同时也对tools目录下的脚本进行整理,做得更好

from rt-thread.

Later-Comer avatar Later-Comer commented on July 22, 2024

目前仓库支持clang-format自动格式的,一般的ide都支持clang-format,比如vscode只要配置下即可在保存的时候自动格式化。

from rt-thread.

unicornx avatar unicornx commented on July 22, 2024

目前仓库支持clang-format自动格式的,一般的ide都支持clang-format,比如vscode只要配置下即可在保存的时候自动格式化。

请问用这个 clang-format 的效果是否和 https://github.com/mysterywolf/formatting 的一致?如果使用 clang-format 是需要人手动在 ide 里配置的,如何保证大家的行动一致并符合 rtt 的要求呢?

from rt-thread.

Later-Comer avatar Later-Comer commented on July 22, 2024

目前仓库支持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.

unicornx avatar unicornx commented on July 22, 2024

也许是目前 github 上 pr 页面的描述误导了我。
image

Anyway,我个人觉得一个仓库自带的,立即可用的类似 linux 的 checkpatch 的工具也许会更方便大家检查。(formatting 工具还需要另外下载这个是我一开始觉得不方便的地方)

如果觉得我这个建议没有必要,请 feel free close this issue.

Regards.

from rt-thread.

BernardXiong avatar BernardXiong commented on July 22, 2024

感觉是有必要,可以考虑的。 @mysterywolf 觉得呢?

from rt-thread.

BernardXiong avatar BernardXiong commented on July 22, 2024

clang-format 是代码格式化,formating严格来说应该说是代码检查,因为提交代码的时候更多只能说是做代码检查的工作,而不是说帮助进行代码格式化。formating偏向机器人,所以机器人是不修改代码的。

from rt-thread.

dongly avatar dongly commented on July 22, 2024

建议在仓库中,加入一个.clang-format 文件,提交 pr 前用 clang-format 代码化一来代码,这样代码风格就一致了

from rt-thread.

dongly avatar dongly commented on July 22, 2024

没细看,原来已经有 .clang-format 文件了

from rt-thread.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.