Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add formatter #201

Closed
wants to merge 1 commit into from
Closed

Add formatter #201

wants to merge 1 commit into from

Conversation

y-yu
Copy link
Contributor

@y-yu y-yu commented Dec 8, 2019

  • qulacs has many C++ code which are NOT formatted like indentation or spacing....
    • Both tabs and spaces are used in the same file
  • So I try to use C++ code formatter clang-format
  • I add the clang-format setting file .clang-format
  • Then I reformat using the command: git ls-files "*.cpp" | xargs clang-format -style=file -i
  • I add check for violation of the format at .travis.yml
  • Firstly I think it's enough to reformat indentation but its diff size is more than 10000..... 馃槆
  • And add .editorconfig to unite the coding rule

Discussion

  • Would we need any formatter?
  • Tab vs space?
    • Especially I don't care if either tabs or spaces but It could be a problem to include both in the same file or the same project
    • UPDATE: Some developers are using Visual Studio and it uses tabs for indentation. So I think it would be better to decide using tabs
      • As my research, Visual Studio uses spaces for indentation by default.... 馃

@y-yu y-yu force-pushed the add-formatter branch 2 times, most recently from 506ac15 to 9bcd120 Compare December 30, 2019 07:15
@y-yu y-yu changed the title [WIP] Add formatter Add formatter Dec 30, 2019
@y-yu y-yu force-pushed the add-formatter branch 5 times, most recently from 5fc60f3 to c75539e Compare December 30, 2019 08:20
@y-yu y-yu mentioned this pull request Dec 30, 2019
@y-yu y-yu force-pushed the add-formatter branch 9 times, most recently from f51e9b5 to c9783b7 Compare January 28, 2020 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants