Compare commits

...
Author SHA1 Message Date
Jeremy Rimpo ece19dddad Update vcpkg targets 2026-04-14 11:35:39 -05:00
pre-commit-ci[bot] af299cb9d4 [pre-commit.ci] Pre-commit autoupdate. (#25) 2026-04-07 07:59:03 +02:00
pre-commit-ci[bot] 7cc4a80665 [pre-commit.ci] Pre-commit autoupdate. (#24)
updates:
- [github.com/pre-commit/mirrors-clang-format: v21.1.2 → v21.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.2...v21.1.8)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-05 19:25:46 +01:00
pre-commit-ci[bot] 3a820002dd [pre-commit.ci] Pre-commit autoupdate. (#23)
updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0)
- [github.com/pre-commit/mirrors-clang-format: v20.1.7 → v21.1.2](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.7...v21.1.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-07 15:01:33 +02:00
pre-commit-ci[bot] ec6d8560bb [pre-commit.ci] Pre-commit autoupdate. (#22)
updates:
- [github.com/pre-commit/mirrors-clang-format: v19.1.5 → v20.1.7](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.5...v20.1.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-07 20:30:16 +02:00
Mikaël Capelle 9b73803f9c Add Github action and fix line ending (#21) 2025-05-29 11:30:13 +02:00
7 changed files with 527 additions and 458 deletions
+41
View File
@@ -0,0 +1,41 @@
---
# We'll use defaults from the LLVM style, but with 4 columns indentation.
BasedOnStyle: LLVM
IndentWidth: 2
---
Language: Cpp
DeriveLineEnding: false
UseCRLF: true
DerivePointerAlignment: false
PointerAlignment: Left
AlignConsecutiveAssignments: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AlwaysBreakTemplateDeclarations: Yes
AccessModifierOffset: -2
AlignTrailingComments: true
SpacesBeforeTrailingComments: 2
NamespaceIndentation: Inner
MaxEmptyLinesToKeep: 1
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: true
ColumnLimit: 88
ForEachMacros: ['Q_FOREACH', 'foreach']
+20
View File
@@ -0,0 +1,20 @@
name: Build Diagnose Basic
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
env:
VCPKG_BINARY_SOURCES: clear;x-azblob,${{ vars.AZ_BLOB_VCPKG_URL }},${{ secrets.AZ_BLOB_SAS }},readwrite
jobs:
build:
runs-on: windows-2022
steps:
- name: Build Diagnose Basic
id: build-diagnose-basic
uses: ModOrganizer2/build-with-mob-action@master
with:
mo2-dependencies: uibase
+16
View File
@@ -0,0 +1,16 @@
name: Lint Diagnose Basic
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check format
uses: ModOrganizer2/check-formatting-action@master
with:
check-path: "."
+6 -6
View File
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-case-conflict
# - repo: https://github.com/pre-commit/mirrors-clang-format
# rev: v19.1.5
# hooks:
# - id: clang-format
# 'types_or': [c++, c]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.2
hooks:
- id: clang-format
'types_or': [c++, c]
ci:
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."
+301 -308
View File
File diff suppressed because it is too large Load Diff
+142 -143
View File
@@ -1,143 +1,142 @@
/*
Copyright (C) 2013 Sebastian Herbord. All rights reserved.
This file is part of basic diagnosis plugin for MO
This plugin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this plugin. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DIAGNOSEBASIC_H
#define DIAGNOSEBASIC_H
#include <QString>
#include <QSet>
#include <QRegularExpression>
#include <uibase/iplugin.h>
#include <uibase/iplugindiagnose.h>
#include <uibase/imoinfo.h>
#include <uibase/imodlist.h>
class DiagnoseBasic : public QObject, public MOBase::IPlugin, public MOBase::IPluginDiagnose
{
Q_OBJECT
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose)
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
Q_PLUGIN_METADATA(IID "org.tannin.DiagnoseBasic")
#endif
public:
DiagnoseBasic();
public: // IPlugin
virtual bool init(MOBase::IOrganizer *moInfo);
virtual QString name() const;
virtual QString author() const;
virtual QString description() const;
virtual MOBase::VersionInfo version() const;
virtual bool isActive() const;
virtual QList<MOBase::PluginSetting> settings() const;
public: // IPluginDiagnose
virtual std::vector<unsigned int> activeProblems() const;
virtual QString shortDescription(unsigned int key) const;
virtual QString fullDescription(unsigned int key) const;
virtual bool hasGuidedFix(unsigned int key) const;
virtual void startGuidedFix(unsigned int key) const;
private:
bool errorReported() const;
bool overwriteFiles() const;
bool invalidFontConfig() const;
bool nitpickInstalled() const;
bool assetOrder() const;
bool missingMasters() const;
bool alternateGame() const;
bool fileAttributes(const QString &executable) const;
private:
static const unsigned int PROBLEM_ERRORLOG = 1;
static const unsigned int PROBLEM_OVERWRITE = 2;
static const unsigned int PROBLEM_INVALIDFONT = 3;
static const unsigned int PROBLEM_NITPICKINSTALLED = 4;
static const unsigned int PROBLEM_PROFILETWEAKS = 7;
static const unsigned int PROBLEM_MISSINGMASTERS = 8;
static const unsigned int PROBLEM_ALTERNATE = 9;
static const unsigned int NUM_CONTEXT_ROWS = 5;
static const QRegularExpression RE_LOG_FILE;
private:
struct ListElement {
QString espName;
QString modName;
int pluginPriority;
int modPriority;
int sortGroup;
bool avoidMove;
QSet<QString> relevantScripts;
};
struct Move {
ListElement item;
ListElement reference;
enum EType {
BEFORE,
AFTER
} type;
Move(const ListElement &initItem, const ListElement &initReference, EType initType)
: item(initItem), reference(initReference), type(initType) {}
};
struct Sorter {
struct {
int operator()(const ListElement &lhs, const ListElement &rhs)
{
return lhs.modPriority < rhs.modPriority;
}
} minMod;
std::vector<Move> moves;
void operator()(std::vector<ListElement> modList);
private:
void sortGroup(std::vector<ListElement> modList);
};
friend bool operator<(const Move &lhs, const Move &rhs);
private:
void topoSort(std::vector<ListElement> &list) const;
bool checkEmpty(const QString &path) const;
private:
MOBase::IOrganizer *m_MOInfo;
mutable QString m_ErrorMessage;
mutable QString m_NewestModlistBackup;
mutable std::set<QString> m_MissingMasters;
mutable std::map<QString, std::set<QString>> m_PluginChildren;
};
#endif // DIAGNOSEBASIC_H
/*
Copyright (C) 2013 Sebastian Herbord. All rights reserved.
This file is part of basic diagnosis plugin for MO
This plugin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this plugin. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DIAGNOSEBASIC_H
#define DIAGNOSEBASIC_H
#include <QRegularExpression>
#include <QSet>
#include <QString>
#include <uibase/imodlist.h>
#include <uibase/imoinfo.h>
#include <uibase/iplugin.h>
#include <uibase/iplugindiagnose.h>
class DiagnoseBasic : public QObject,
public MOBase::IPlugin,
public MOBase::IPluginDiagnose
{
Q_OBJECT
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose)
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
Q_PLUGIN_METADATA(IID "org.tannin.DiagnoseBasic")
#endif
public:
DiagnoseBasic();
public: // IPlugin
virtual bool init(MOBase::IOrganizer* moInfo);
virtual QString name() const;
virtual QString author() const;
virtual QString description() const;
virtual MOBase::VersionInfo version() const;
virtual bool isActive() const;
virtual QList<MOBase::PluginSetting> settings() const;
public: // IPluginDiagnose
virtual std::vector<unsigned int> activeProblems() const;
virtual QString shortDescription(unsigned int key) const;
virtual QString fullDescription(unsigned int key) const;
virtual bool hasGuidedFix(unsigned int key) const;
virtual void startGuidedFix(unsigned int key) const;
private:
bool errorReported() const;
bool overwriteFiles() const;
bool invalidFontConfig() const;
bool nitpickInstalled() const;
bool assetOrder() const;
bool missingMasters() const;
bool alternateGame() const;
bool fileAttributes(const QString& executable) const;
private:
static const unsigned int PROBLEM_ERRORLOG = 1;
static const unsigned int PROBLEM_OVERWRITE = 2;
static const unsigned int PROBLEM_INVALIDFONT = 3;
static const unsigned int PROBLEM_NITPICKINSTALLED = 4;
static const unsigned int PROBLEM_PROFILETWEAKS = 7;
static const unsigned int PROBLEM_MISSINGMASTERS = 8;
static const unsigned int PROBLEM_ALTERNATE = 9;
static const unsigned int NUM_CONTEXT_ROWS = 5;
static const QRegularExpression RE_LOG_FILE;
private:
struct ListElement
{
QString espName;
QString modName;
int pluginPriority;
int modPriority;
int sortGroup;
bool avoidMove;
QSet<QString> relevantScripts;
};
struct Move
{
ListElement item;
ListElement reference;
enum EType
{
BEFORE,
AFTER
} type;
Move(const ListElement& initItem, const ListElement& initReference, EType initType)
: item(initItem), reference(initReference), type(initType)
{}
};
struct Sorter
{
struct
{
int operator()(const ListElement& lhs, const ListElement& rhs)
{
return lhs.modPriority < rhs.modPriority;
}
} minMod;
std::vector<Move> moves;
void operator()(std::vector<ListElement> modList);
private:
void sortGroup(std::vector<ListElement> modList);
};
friend bool operator<(const Move& lhs, const Move& rhs);
private:
void topoSort(std::vector<ListElement>& list) const;
bool checkEmpty(const QString& path) const;
private:
MOBase::IOrganizer* m_MOInfo;
mutable QString m_ErrorMessage;
mutable QString m_NewestModlistBackup;
mutable std::set<QString> m_MissingMasters;
mutable std::map<QString, std::set<QString>> m_PluginChildren;
};
#endif // DIAGNOSEBASIC_H
+1 -1
View File
@@ -9,7 +9,7 @@
"default-registry": {
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "294f76666c3000630d828703e675814c05a4fd43"
"baseline": "74e6536215718009aae747d86d84b78376bf9e09"
},
"registries": [
{