Skip to content

Latest commit

 

History

History
82 lines (65 loc) · 2 KB

CONTRIBUTING.md

File metadata and controls

82 lines (65 loc) · 2 KB

System Requirements

  • C++17 Compiler (Visual Studio Code)
  • MINGW (Optional)

How To Run

Compiling

g++ pgprogram.cpp HTMLFile.h HTMLFile.cpp MainPage.h MainPage.cpp -o pgprogram --std=c++17

Without specified arguments

On CMD, enter command pgprogram fname. (Where fname is the name of a file/folder)

With specified arguments:

Option 1 Option 2 Functionality
--input -i Specify input argument with file/folder name
--help -h See the instructions how to run program
--version -v See the updated version of the program

Format the code

  • Install clang-format
npm install clang-format
  • Create .clang-format file
clang-format.exe -style=llvm -dump-config > .clang-format
  • Download Clang Format Editor to test custom format.
  • Run the editor on the whole project with style WebKit
clang-format -i -style=WebKit *.cpp *.h
  • clang-format on VS Code

    • Install clang-format extension
    • Shift+Alt+F to format your current file

Check the code usability

clang-tidy --checks='modernize*, readability*' filename.cpp -- -std=c++17
  • Fix the error

  • clang-tidy on VS Code

    • Install clang-tidy extension
    • It will read through your file and show errors/warnings

Testing

  • Download catch.hpp from Catch2 Repo (already in test folder)
  • Add test#.cpp file (# represents for number accordingly)
  • Execute g++ ./test/test#.cpp -o test# --std=c++17
  • See the results in the Output