Skip to content

pavel-cpp/cisort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example

C/С++ Includes Sort

This is a tool that allows you to quickly and conveniently sort all libraries included in the project in alphabetical order.

Examples

example

Text before:

#include <iostream>
#include <vector>
#include <stdio.h>
#include <algorithm>

#include "mylib.h"
#include "b_lib.h"
#include "a_first_lib.h"

#include <external/lib/main.hpp>
#include <external/lib/abuse.hpp>
#include <external/lib/func.hpp>

int main(){
	std::cout << "Hello, World!" << std::endl;
}

Text after:

#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <vector>

#include "a_first_lib.h"
#include "b_lib.h"
#include "mylib.h"

#include <external/lib/abuse.hpp>
#include <external/lib/func.hpp>
#include <external/lib/main.hpp>

int main(){
	std::cout << "Hello, World!" << std::endl;
}

Installation:

pip install cisort

Usage:

cisort [flags] [path]

Flags:
        -r - recursive searching C/C++ files
        -ls - show info about sorted files
        -h --help - to get help

Features and ideas

  • Include sorting
  • Sorting with comments
  • Grouping includes
  • Different preprocessing commands support (e.g. #pragma)
  • Supporting user custom includes

Authors

Anton Zemtsov Pavel Remdenok

About

Tool for sort includes in C/C++ code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages