Commit Graph

28 Commits

Author SHA1 Message Date
Werner Henze b2f6bec48e clang-format improvements (#1251)
* clang-format improvements

- Add a clang-format linter check to the PR pipeline
- Apply clang-format to files where the linter initially failed
- Remove `CommentPragmas` from `.clang-format`
- Remove all `// clang-format off` and `// NO-FORMAT` as they are not needed
- Remove a commented out `GSL_SUPPRESS`

* clang-format 20

* pipeline fail

* Update .github/workflows/clang-format.yml

Co-authored-by: Carson Radtke <nosrac925@gmail.com>

* output used clang-format version

* installed version is 18 which replaces "GSL_SUPPRESS(bounds.1)" with "GSL_SUPPRESS(bounds .1)"

* only include/gsl, not include

to prevent formatting of include/CMakeLists.txt

* apply clang-format[-20]

In a VS2026 developer command prompt I ran `clang-format -i include\gsl\* --assume-filename x.cpp`. This was necessary because VS GUI does not format files without an extension :(. Please note that `--assume-filename` is necessary here, otherwise the files will not be formatted. Surprisingly the behaviour for the formatter differs from the behaviour of `lang-format(-20) --dry-run --Werror include/gsl/*` where clang-format recognizes that the files is C++.

* change "#if 0" back to original version with comments only

* formatting scripts for windows and linux

for linux with linter (shfmt and shellcheck)

* add WhitespaceSensitiveMacros: [GSL_SUPPRESS]

* provide path for clang-format (Windows)

Currently not clear to me:
On my personal computer at home, when I start "Developer Command Prompt for VS18", I can run `clang-format` without providing the path.
On my managed (domain) company computer, when I start "Developer Command Prompt for VS18", I can NOT run `clang-format` without providing the path. I need to call `"%VCINSTALLDIR%Tools\Llvm\bin\clang-format"`.
I have no idea what the difference is. At least the version `"%VCINSTALLDIR%Tools\Llvm\bin\clang-format"` works on both computers, so I add the path.

---------

Co-authored-by: Werner Henze <w.henze@avm.de>
Co-authored-by: Carson Radtke <nosrac925@gmail.com>
Co-authored-by: Werner Henze <werner.henze+gitcommits@posteo.de>
2026-06-05 06:45:10 -06:00
Werner Henze fcd55ee924 Better use of std::enable_if (#1177)
* this commits adds tests that should fail, but don't

* Better use of std::enable_if

Replace the occurances of `class = std::enable_if_t<Cond>` and `typename = std::enable_if_t<Cond>` that have been identified in the previous commit with `std::enable_if_t<Cond, bool> = true`.

This commit is inspired by #1174, which changed one occurance in the owner header. This commit is aimed to fix all remaining occurances.

* fix failing checks

- core.cxx_gsl aktualisiert auf [](https://gitlab.avm.de/fos/repos/core.cxx_gsl/-/commit/)
- plc.access_lib aktualisiert auf [](https://gitlab.avm.de/fos/repos/plc.access_lib/-/commit/)
- plc.common aktualisiert auf [](https://gitlab.avm.de/fos/repos/plc.common/-/commit/)
- plc.daemon aktualisiert auf [](https://gitlab.avm.de/fos/repos/plc.daemon/-/commit/)
-

Test Plan:
-

---------

Co-authored-by: Werner Henze <werner.henze+gitcommits@posteo.de>
Co-authored-by: Werner Henze <w.henze@avm.de>
2024-12-23 10:40:22 -06:00
Bruce Mitchener caae4dd0f8 Fix some typos. (#1146) 2024-02-21 15:06:29 -08:00
dmitrykobets-msft bcf008ae55 Fix/implement C++2020 compilation, tests, and CI (#1017)
* Fix C++20 bugs and tests
* Rework CI for C++2020 tests
* Update readme compiler versions
2021-12-09 14:54:06 -08:00
Jordan Maples [MSFT] b26f6d5ec7 gsl::at behavior change regarding gsl::span (#985)
* move span specialization of 'at' to <gsl/span> and update the parameter to be taken by reference

* undid previous changes and acted upon decisions made in maintainer sync. Fixed tests failing in /kernel mode

* ran clang-format on the include folder

* ran clang-format on the test folder

Co-authored-by: Jordan Maples <jordan.maples@microsoft.com>
2021-05-20 18:18:08 -07:00
Jordan Maples [MSFT] a150aaa4ed renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946)
Header rename
2020-10-29 17:38:48 -07:00
Jordan Maples 2085c7acde initial impl of P1976R2 2020-05-19 16:27:46 -07:00
Jordan Maples 7341c5d1b5 implement LWG3320 by deleting const_iterator and const_reverse_iterator 2020-04-14 13:51:49 -07:00
Jordan Maples efbce17ca4 testing one of CaseyCarter's comments 2020-04-09 17:33:33 -07:00
Jordan Maples ffbfcc0a9f apply clang-format to the span_compatibility_tests. 2020-04-09 16:15:08 -07:00
Jordan Maples 5ca02327c4 another test 2020-04-09 15:56:26 -07:00
Jordan Maples 8d907dadfb prevent comparison for apple clang versions older than 11 2020-04-09 14:35:44 -07:00
Jordan Maples b7d9d754ac another attempt at apple clang version filtering 2020-04-09 14:17:52 -07:00
Jordan Maples 809aee2315 testing different major/minor for Apple suppression 2020-04-09 11:51:59 -07:00
Jordan Maples 6ef56d73da fixed a couple typos 2020-04-09 10:35:44 -07:00
Jordan Maples 2f9d873043 added additional filtering to Apple clang versions 9.4 and 10.1 for the ArrayConvertibilityCheck 2020-04-09 10:34:58 -07:00
Jordan Maples 01d206f4d8 adding additional filtering 2020-04-08 14:38:01 -07:00
Jordan Maples ddde9e153d update convertibility test 2020-03-19 14:08:04 -07:00
Jordan Maples 6eab19d3c1 moving decl so we dont get the stl_nullptr is not used warning 2020-03-17 15:13:26 -07:00
Jordan Maples f8bcb7d9eb applied clang-format 2020-03-17 15:04:58 -07:00
Jordan Maples 9b3ac8d681 discussed the issue with Casey Carter, the span ctor changes are accurate but the tests are not. The test require work that was done in C++17 regarding qualifier conversions to work correctly. Scoping tests for 17. 2020-03-17 15:02:00 -07:00
Jordan Maples 1dd1320c8b test commit to get extra eyes on the problem 2020-03-17 13:53:13 -07:00
Jordan Maples [MSFT] 94f43d4adf splitting up span's standard and non-standard behavior 2020-02-19 14:28:12 -08:00
Jordan Maples [MSFT] f4c608fd39 addressing comments 2020-02-18 14:09:11 -08:00
Jordan Maples [MSFT] 6b01a0488b Update span_compatibility_tests.cpp
some fixes.
2020-02-14 16:25:25 -08:00
jordan maples b6b1e9c3cf assert -> expect_true 2020-02-14 16:13:21 -08:00
Jordan Maples [MSFT] 67a7f7eaef errors in appveyor are indicating that AsWritableByesCompilersFor needs to be static. 2020-02-14 15:44:58 -08:00
Jordan Maples [MSFT] 41ae38f197 addressing a few more comments and adding gsl-std span compatibility tests 2020-02-14 15:24:46 -08:00