Skip to content

Commit

Permalink
lint: add spell checking lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed May 25, 2022
1 parent 598579d commit 1ed2538
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build/
out/
cmake-build-*/

# User spesific settings
# User specific settings
CMakeUserPresets.json

# IDE files
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RUN apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y --no-install-recommends \
neovim emacs nano

# Install optional dependecies
# Install optional dependencies
RUN apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y --no-install-recommends \
doxygen graphviz ccache cppcheck
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ conan-cache/
.cache/
coverage.xml

# User spesific settings
# User specific settings
CMakeUserPresets.json

# IDE files
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
version: 3

tasks:
# The templates called in the other tasks. The variables can be set using the `vars` parameter or by enviroment variables. To create global variables that are passed to the internally called templates, use `env`
# The templates called in the other tasks. The variables can be set using the `vars` parameter or by environment variables. To create global variables that are passed to the internally called templates, use `env`
# This template accepts the generator, build type and feature flags defined by the vars. Other flags can be passed by `CONFIGURE_FLAGS` and `BUILD_FLAGS`. For example, a specific target can be built by setting BUILD_FLAGS to "--target <NAME>"
build_template:
- cmake ./ -B ./build -G '{{.CMAKE_GENERATOR | default "Ninja Multi-Config"}}' -DCMAKE_BUILD_TYPE:STRING={{.CMAKE_BUILD_TYPE}} -DFEATURE_TESTS:BOOL={{.FEATURE_TESTS}} -DFEATURE_DOCS:BOOL='{{.FEATURE_DOCS | default "OFF"}}' {{.CONFIGURE_FLAGS}}
Expand Down
81 changes: 81 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
version: "0.2"
files:
- "**/*"
ignorePaths:
- pnpm-lock.yaml
- .git/
- dist/
useGitignore: true
language: en, en-GB
allowCompoundWords: true
enableGlobDot: true
words:
- aminya
- asan
- ccache
- ccmake
- choco
- clangd
- clpath
- cmake
- cmakelint
- cmds
- cobertura
- codecov
- codeql
- covertura
- cpack
- CPATH
- Cppcheck
- cppcoreguidelines
- cpprc
- cpptools
- ctest
- DCATCH
- DCMAKE
- dearmor
- DFEATURE
- DontAlign
- eamodio
- ehthumbs
- Eigen
- FLTK
- fuzzer
- gcov
- gcovr
- gedit
- GTKMM
- Hostx
- hwrap
- ifeq
- IMGUI
- inplace
- IWYU
- kwargs
- lldb
- mkdir
- msvc
- myproject
- nothrow
- nproc
- Opencppcoverage
- pargs
- pnpm
- PTRACE
- pwsh
- pylance
- refreshenv
- rmrf
- SFML
- socat
- SYSREQUIRES
- TLDR
- TOLOWER
- TOUPPER
- twxs
- vcpkg
- vcvarsall
- vcvarsallpath
- VSINSTALLDIR
- vswhere
- webp
8 changes: 6 additions & 2 deletions my_exe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ target_link_libraries(my_exe PRIVATE project_options project_warnings) # link pr

# Includes
# because my_exe includes are private, it uses absolute paths.
set(my_exe_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" CACHE STRING "")
set(my_exe_INCLUDE_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/include"
CACHE STRING "")
target_include_directories(my_exe PRIVATE "${my_exe_INCLUDE_DIR}")

# Find dependencies:
set(my_exe_DEPENDENCIES_CONFIGURED fmt CACHE STRING "")
set(my_exe_DEPENDENCIES_CONFIGURED
fmt
CACHE STRING "")

foreach(DEPENDENCY ${my_exe_DEPENDENCIES_CONFIGURED})
find_package(${DEPENDENCY} CONFIG REQUIRED)
Expand Down
13 changes: 8 additions & 5 deletions my_header_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ add_library(my_header_lib INTERFACE)
target_link_libraries(my_header_lib INTERFACE project_options project_warnings) # link project_options/warnings

# Includes
set(my_header_lib_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" CACHE STRING "")
target_include_directories(
my_header_lib INTERFACE "$<BUILD_INTERFACE:${my_header_lib_INCLUDE_DIR}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
set(my_header_lib_INCLUDE_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/include"
CACHE STRING "")
target_include_directories(my_header_lib INTERFACE "$<BUILD_INTERFACE:${my_header_lib_INCLUDE_DIR}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")

# Find dependencies:
set(my_header_lib_DEPENDENCIES_CONFIGURED fmt CACHE STRING "")
set(my_header_lib_DEPENDENCIES_CONFIGURED
fmt
CACHE STRING "")

foreach(DEPENDENCY ${my_header_lib_DEPENDENCIES_CONFIGURED})
find_package(${DEPENDENCY} CONFIG REQUIRED)
Expand Down
38 changes: 19 additions & 19 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "myproject",
"version-string": "0.1.0",
"builtin-baseline": "a3df696929b28195b0d7a477ba6cd16dba48fa52",
"dependencies": [
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "myproject",
"version-string": "0.1.0",
"builtin-baseline": "a3df696929b28195b0d7a477ba6cd16dba48fa52",
"dependencies": [
{
"name": "fmt",
"version>=": "8.1.1"
}
],
"features": {
"tests": {
"description": "Build the tests of the package's tests",
"dependencies": [
{
"name": "fmt",
"version>=": "8.1.1"
}
],
"features": {
"tests": {
"description": "Build the tests of the package's tests",
"dependencies": [
{
"name": "catch2",
"version>=": "2.13.7"
}
]
"name": "catch2",
"version>=": "2.13.7"
}
]
}
}
}
}

0 comments on commit 1ed2538

Please sign in to comment.