https://github.com/egeonder/revolv-assignment
A C++ library to check if a number is prime with a command-line interface.
https://github.com/egeonder/revolv-assignment
cmake cpp gtest prime-numbers
Last synced: 7 months ago
JSON representation
A C++ library to check if a number is prime with a command-line interface.
- Host: GitHub
- URL: https://github.com/egeonder/revolv-assignment
- Owner: EgeOnder
- License: mit
- Created: 2025-01-13T15:14:05.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-01-13T16:06:15.000Z (12 months ago)
- Last Synced: 2025-01-13T16:35:27.067Z (12 months ago)
- Topics: cmake, cpp, gtest, prime-numbers
- Language: C++
- Homepage: https://www.revolvspace.com
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Prime Number Checker
A C++ library to check if a number is prime with a command-line interface.
## Requirements
- C++17 compiler
- CMake >= 3.14
- Google Test
### Installing Dependencies
#### Ubuntu/Debian
```bash
sudo apt-get update
sudo apt-get install build-essential cmake libgtest-dev
```
#### macOS
```bash
brew install cmake googletest
```
## Building and Running
```bash
make run
```
## Running Tests
```bash
make test
```
## Code Style and Linting
This project uses clang-format and clang-tidy to maintain code quality.
### Formatting Code
First, install clang-format:
```bash
sudo apt-get install clang-format
# OR on macOS
brew install clang-format
```
Then, to format your code:
```bash
./scripts/format.sh
```
The CI pipeline will automatically check formatting and linting.
## Quick Commands
```bash
make help # Show all commands
make build # Build the project
make run # Run the program
make test # Run all tests
make format # Format the code
make clean # Remove build directory
```
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the code of conduct, and the process for submitting pull requests.
## License
This project is licensed under the [MIT License](LICENSE)