An open API service indexing awesome lists of open source software.

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.

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)