Skip to content

Commit 0e0442d

Browse files
committed
Add clang-format off to the generated code
1 parent 43d4025 commit 0e0442d

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

R/register.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ cpp_register <- function(path = ".", quiet = FALSE) {
9797

9898
brio::write_lines(path = cpp_path, glue::glue('
9999
// Generated by cpp11: do not edit by hand
100+
// clang-format off
100101
101102
{extra_includes}
102103
#include "cpp11/declarations.hpp"

cpp11test/src/cpp11.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Generated by cpp11: do not edit by hand
2+
// clang-format off
23

34
#include <cpp11/R.hpp>
45
#include <Rcpp.h>

tests/testthat/test-register.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ foo <- function() {
519519
expect_true(file.exists(cpp_bindings))
520520
expect_equal(read_file(cpp_bindings),
521521
"// Generated by cpp11: do not edit by hand
522+
// clang-format off
522523
523524
524525
#include \"cpp11/declarations.hpp\"

0 commit comments

Comments
 (0)