Skip to content

Commit e6c1fda

Browse files
committed
chore: fiddling with clang/IDE
1 parent fcb8545 commit e6c1fda

5 files changed

Lines changed: 50 additions & 4 deletions

File tree

.clangd

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
CompileFlags:
2+
Add: [
3+
# C++ Standard
4+
-std=c++20,
5+
6+
# Project include paths
7+
-Ipackages/react-native-quick-crypto/cpp/**,
8+
9+
# Dependencies
10+
-Ipackages/react-native-quick-crypto/deps/**,
11+
12+
# Libsodium includes
13+
-Ipackages/react-native-quick-crypto/ios/libsodium-stable/src/libsodium/include,
14+
15+
# Nitro Modules includes
16+
-Ipackages/react-native-quick-crypto/nitrogen/generated/shared/c++,
17+
-Inode_modules/react-native-nitro-modules/cpp/**,
18+
19+
# OpenSSL includes
20+
# -Iexample/ios/Pods/OpenSSL-Universal/OpenSSL.xcframework/**/**,
21+
-I/opt/homebrew/Cellar/openssl@3/3.5.0/include,
22+
]
23+
24+
# # Compiler flags
25+
# Compiler: clang++
26+
27+
# # Diagnostics settings
28+
# Diagnostics:
29+
# UnusedIncludes: Strict
30+
31+
# # Clang-Tidy settings
32+
# If:
33+
# PathMatch: .*\.cpp
34+
# ClangTidy:
35+
# Add: [
36+
# modernize-*,
37+
# performance-*,
38+
# bugprone-*,
39+
# -modernize-use-trailing-return-type,
40+
# ]
41+
42+
# # Index settings
43+
# Index:
44+
# Background: Build

.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Every time you choose to apply a rule(s), explicitly state the rule(s) in the ou
2222

2323
## Rules
2424

25-
- For C++ includes, do not try to add absolute or relative paths. They have to be resolved by the build system.
25+
- For C++ includes, do not try to add absolute paths. They have to be resolved by the build system.
2626
- Use smart pointers in C++.
2727
- Use modern C++ features.
2828
- Attempt to reduce the amount of code rather than add more.

packages/react-native-quick-crypto/cpp/cipher/HybridCipher.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22

3-
#include <memory>
43
#include <openssl/core_names.h>
54
#include <openssl/err.h>
65
#include <openssl/evp.h>

packages/react-native-quick-crypto/cpp/cipher/XSalsa20Cipher.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
#include "XSalsa20Cipher.hpp"
21
#include <cstring> // For std::memcpy
32
#include <stdexcept> // For std::runtime_error
43

4+
#include "ArrayBuffer.hpp"
5+
#include "XSalsa20Cipher.hpp"
6+
#include "Utils.hpp"
7+
58
namespace margelo::nitro::crypto {
69

710
/**

packages/react-native-quick-crypto/cpp/cipher/XSalsa20Cipher.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#include "sodium.h"
44

5+
#include "ArrayBuffer.hpp"
56
#include "HybridCipher.hpp"
6-
#include "Utils.hpp"
77

88
namespace margelo::nitro::crypto {
99

0 commit comments

Comments
 (0)