Skip to content

Commit

Permalink
Merge pull request #604 from antonvw/develop
Browse files Browse the repository at this point in the history
Version 24.04
  • Loading branch information
antonvw authored Mar 29, 2024
2 parents a26da66 + 432a1be commit 0a4c908
Show file tree
Hide file tree
Showing 300 changed files with 4,961 additions and 2,996 deletions.
126 changes: 5 additions & 121 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
Language: Cpp
AccessModifierOffset: -2
Language: Cpp
BasedOnStyle: LLVM

AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
Expand All @@ -19,130 +15,18 @@ AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeComma
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
IndentWidth: 2
InsertBraces: true
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 2
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
...

50 changes: 50 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
Checks:
'-*,
modernize-avoid-c-arrays,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-use-bool-literals,
modernize-use-default-member-init,
modernize-use-emplace,
modernize-use-nullptr,
modernize-use-override,
modernize-use-std-print,
modernize-use-starts-ends-with,
modernize-use-uncaught-exceptions,
modernize-use-using,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-vector-operation,
performance-trivially-destructable,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
readability-uppercase-literal-suffix'

WarningsAsErrors: '*'

HeaderFileExtensions:
- ''
- h
ImplementationFileExtensions:
- c
- cc
- cpp
HeaderFilterRegex: ''

FormatStyle: 'file'

CheckOptions:
cert-dcl16-c.NewSuffixes: 'L;LL;LU;LLU'
google-readability-namespace-comments.ShortNamespaceLines: '10'
llvm-else-after-return.WarnOnUnfixable: 'false'
cert-str34-c.DiagnoseSignedUnsignedCharComparisons: 'false'
cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: 'true'
llvm-qualified-auto.AddConstToQualified: 'false'
llvm-else-after-return.WarnOnConditionVariables: 'false'
cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField: 'false'

SystemHeaders: false
35 changes: 16 additions & 19 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,56 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install boost
uses: MarkusJx/[email protected].1
uses: MarkusJx/[email protected].5
id: install-boost
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/actions/boost-versions/blob/main/versions-manifest.json
boost_version: 1.81.0
boost_version: 1.83.0
# OPTIONAL: Specify a platform version
platform_version: 20.04

- name: Install gtk
run: sudo apt-get update && sudo apt-get install liblzma5 libjbig0 libgtk-3-dev

- name: Install gcc, lcov, gdb
run: sudo apt-get install -yq gcc-12 g++-12 lcov gdb
run: sudo apt-get install -yq gcc-13 g++-13 lcov gdb

- name: Install xvfb to allow headless tests
run: sudo apt-get install xvfb


- name: Install ninja
run: sudo apt-get install ninja-build

- name: Install coveralls
run: sudo curl -L https://coveralls.io/coveralls-linux.tar.gz | tar -xz -C /usr/local/bin

- name: Install robotframework
run: sudo pip install robotframework

- name: Configure
# adding -DwexBUILD_SAMPLES=ON should result in app running,
# adding -s samples switch should result in app running,
# but then the headless test keeps on running
run: export CC=gcc-12 && export CXX=g++-12 && mkdir build && cd build &&
cmake
-DCMAKE_BUILD_TYPE=Coverage
-DwexGCOV=gcov-12
-DwexBUILD_TESTS=ON
-DwexBUILD_GITHUB=ON
-DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include
-DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib
..
run: ./build-gen.sh -b -c -g -p -t -B ${{steps.install-boost.outputs.BOOST_ROOT}}
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
CC: gcc-13
CXX: g++-13

- name: Make
run: cd build && make
- name: Make using ninja
run: cd build && ninja

- name: Headless Test
run: cd build &&
make lcov-prep &&
ninja lcov-prep &&
xvfb-run --auto-servernum ctest -VV &&
make lcov
ninja lcov

- name: Coveralls
run: cd build && coveralls -r 9vV6skuIGeagBBkz5TCZNI12ezUv12gOj --format=lcov --file=src/app.run
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Lint code base
uses: docker://github/super-linter:v4
Expand All @@ -27,7 +27,7 @@ jobs:
VALIDATE_SQLFLUFF: false

# exclude xsl, all externals,
FILTER_REGEX_EXCLUDE: .*data/*.xsl|external|src/syntac/wex|locale/po-sync.sh|ci/osx-script.sh
FILTER_REGEX_EXCLUDE: .*data/*.xsl|external|src/syntac/wex|locale/po-sync.sh

# cpplint
C_CPPLINT_ARGUMENTS: --quiet --filter=-build,-readability/fn_size,-readability/multiline_string,-runtime/explicit,-runtime/indentation_namespace,-runtime/int,-runtime/references,-whitespace
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "external/ctags"]
path = external/ctags
url = https://github.com/universal-ctags/ctags.git
[submodule "external/wxMaterialDesignArtProvider"]
path = external/wxMaterialDesignArtProvider
url = https://github.com/perazz/wxMaterialDesignArtProvider
4 changes: 3 additions & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

sonar.sources=src
sonar.exclusions=test
sonar.inclusions=include/wex
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## 24.04 - 2024-04-01 [Unreleased]

### Added

- clang-tidy support
- added osx, linux build script build-gen.sh for building wex or
for building apps using it (installed as wex-build-gen.sh)
- the build tool now supports ninja besides make
- added class function_repeat to offer syncing without idle events
- added class reflection to add reflection to classes
- added wxMaterialDesignArtProvider, and renamed wex::stockart into wex::art.

### Changed

- moved single_choice_dialog to syntax lib, use data::window parameter
- ex options ignorecase and matchword are kept in config
- std::optional is used to return values at several places
- use more enum classes

### Fixed

- sync_close_all now correctly handled
- syntax on now restores previous syntax
- case insensitive find in files
- auto_complete handling
- history clear fixed
- statusbar setup after showing dialog fixed
- vi selecting using arrow keys while shift or control down pressed
- switching between find in stc margin and normal window
- ex mode fixes for printing, adjust_window

## 23.10 - 2023-10-08

### Added
Expand All @@ -26,6 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- added wex::ex_stream::stream argument line size and increased default value

### Fixed

- possible crash in lisview sorting
- ctags::find and empty tag finds next tag
- rectangular paste
Expand Down Expand Up @@ -441,4 +471,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- CEdit is used as base for the output
- Visual C++ 5.0

<!-- markdownlint-configure-file { "MD022": false, "MD024": false, "MD030": false, "MD032": false} -->
<!-- markdownlint-configure-file { "MD022": false,
"MD024": false, "MD030": false, "MD032": false} -->
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ if (wexBUILD_GITHUB)
add_definitions(-DGITHUB)
endif ()

if (APPLE)
find_package(LLVM REQUIRED CONFIG)
endif ()

set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON)

find_package(Boost 1.81.0 COMPONENTS
log_setup log filesystem program_options date_time regex json url REQUIRED)

set(WEX_CXX_STANDARD 23) # see also FindWEX.cmake, c_cpp_properties.json
set(CMAKE_CXX_STANDARD ${WEX_CXX_STANDARD})
set(user $ENV{USER} CACHE INTERNAL "keep user")

include(cmake/options-wx.cmake)
Expand Down Expand Up @@ -84,6 +86,9 @@ set(wex_own_LIBRARIES

separate_arguments(wex_own_LIBRARIES)

set(WEX_CXX_STANDARD 23) # see also FindWEX.cmake, c_cpp_properties.json
set(CMAKE_CXX_STANDARD ${WEX_CXX_STANDARD})

add_subdirectory(ci)
add_subdirectory(src)

Expand Down
Loading

0 comments on commit 0a4c908

Please sign in to comment.