googlestylecppcheck's Introduction
Измененный скрипт Google, проверяющий стиль исходного кода c++ Исходный скрипт находится тут: http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py Изменено следующее: 1. Добавлена проверка на то, что имя класса начинается на 'C', а имя структуры на 'S' 2. Оригинальный скрипт ругается если между концом строчки кода и комментом менее двух пробелов, теперь он ругается если пробелов менее одного. 3. Убрано предупреждение, которое ругалось на код вида class CTest { } гугл требовал объявлять классы так class CTest { } 4. Добавлено проверка наличия doxygen-комментариев перед объявлением класса. Объявлять класс требуется так: /// doxygen comment class CTest { }; 5. Все отступы в коде должны быть кратны 4-м пробелам. Добавлена проверка отступов в болоках { } Теперь код обрабатывается следующим образом: { int i; // корректно int n; // корректно int k; // предупреждение! { public: // корректно int s; // корректно } } // предупреждение! т.к. у закрывающей скобки отступ не равен открывающей. 6. Директивы типа #ifdef, #define должны начинаться с самого начала строки. Пробелы перед # в начале строки недопустимы. 7. Макросы должны начинаться с DEF_ #define DEF_MAX(i, j) ((i) > (j) ? (i) : (j)) // хорошо #define MAX(i, j) ((i) > (j) ? (i) : (j)) // плохо
googlestylecppcheck's People
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.