All Projects → mysterywolf → formatting

mysterywolf / formatting

Licence: MIT License
源码格式自动化调整工具

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to formatting

Juliaformatter.jl
An opinionated code formatter for Julia. Plot twist - the opinion is your own.
Stars: ✭ 217 (+486.49%)
Mutual labels:  formatter, formatting
awesome-python-code-formatters
A curated list of awesome Python code formatters
Stars: ✭ 168 (+354.05%)
Mutual labels:  formatter, formatting
Nginx Config Formatter
nginx config file formatter/beautifier written in Python.
Stars: ✭ 222 (+500%)
Mutual labels:  formatter, formatting
kirai
String formatting library for Java, Android, Web and Unix Terminal
Stars: ✭ 69 (+86.49%)
Mutual labels:  formatter, formatting
dockerfile-utils
A library and command line interface for formatting and linting Dockerfiles.
Stars: ✭ 17 (-54.05%)
Mutual labels:  formatter, formatting
Editorconfig Netbeans
A NetBeans IDE plugin supporting the EditorConfig standard. ⛺
Stars: ✭ 123 (+232.43%)
Mutual labels:  formatter, formatting
idea-uroborosql-formatter
Beautiful SQL Formatter for IntelliJ Platform
Stars: ✭ 18 (-51.35%)
Mutual labels:  formatter, formatting
Vse Formatdocumentonsave
Visual Studio - Format Document on Save
Stars: ✭ 61 (+64.86%)
Mutual labels:  formatter, formatting
teks
Easily get custom go template based outputs to your command-line tool. Like in docker/kubernetes
Stars: ✭ 41 (+10.81%)
Mutual labels:  formatter, formatting
Golite
Add essential language support for the Go language to Sublime Text 3.
Stars: ✭ 14 (-62.16%)
Mutual labels:  formatter, formatting
Sublime-uroboroSQL-formatter
Beautiful SQL Formatter for Sublime Text 3
Stars: ✭ 25 (-32.43%)
Mutual labels:  formatter, formatting
ufmt
Safe, atomic formatting with black and µsort
Stars: ✭ 46 (+24.32%)
Mutual labels:  formatter, formatting
laravel-formatters
«‎Formatter» pattern for Laravel
Stars: ✭ 86 (+132.43%)
Mutual labels:  formatter, formatting
unicode-formatter
Convert portions of text to fancy text using unicode fonts for use on Twitter and other sites that don't support rich text
Stars: ✭ 31 (-16.22%)
Mutual labels:  formatter, formatting
AutoFormatInputWatcher
This repository contains input watcher for auto formatting digits in edit text
Stars: ✭ 15 (-59.46%)
Mutual labels:  formatter, formatting
unify
Modifies strings to all use the same quote where possible
Stars: ✭ 69 (+86.49%)
Mutual labels:  formatter
megalinter
🦙 Mega-Linter analyzes 48 languages, 22 formats, 19 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
Stars: ✭ 534 (+1343.24%)
Mutual labels:  formatting
pretty print formatter
Pretty Print Formatter for Elixir Logger module -- Colorize Ecto's SQL ouput 🖌️
Stars: ✭ 22 (-40.54%)
Mutual labels:  formatter
react-put
A flexible formatter and i18n interface for React.
Stars: ✭ 23 (-37.84%)
Mutual labels:  formatter
sublime-stylefmt
Sublime Text plugin for Stylefmt
Stars: ✭ 49 (+32.43%)
Mutual labels:  formatter

Formatting 源码格式自动化调整工具

如果喜欢请Star,这是对本开源项目最大的鼓励,谢谢


本文件会自动递归遍历指定文件夹下的所有文件或者指定的文件(默认对.c/.h/.cpp/.hpp,也可以改成你想要的文件类型)进行扫描:

  • 将源文件编码统一为UTF-8

  • 将TAB键替换为4空格

  • 将每行末尾多余的空格删除,并统一换行符为'\n'

  • 将RT-Thread版权信息的截至年份修改至今年(若文件不涉及此问题,程序会自动忽略)

  • 将上海睿赛德版权信息的截至年份修改至今年(若文件不涉及此问题,程序会自动忽略)

安装依赖软件包

pip install -r requirements.txt

使用方法

方法一

直接运行脚本,根据提示信息,输入要扫描的文件夹或者文件名即可。

▸ python formatting.py
Please enter work path or file to format: test_dir

方法二

可以直接在命令行参数中指定需要格式化的文件夹或者文件名

▸ python formatting.py [dir/file_name]

教学视频

https://www.bilibili.com/video/BV1XN411Q7n3

使用协议

本软件为MIT协议,可以自由免费使用,无论是个人目的还是商业目的,但是发现本脚本有任何问题,请提PR协助修复。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].