Skip to content

Commit

Permalink
CI: spell check our codebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny authored May 9, 2024
2 parents 9fc6026 + 635a148 commit 986f2c4
Show file tree
Hide file tree
Showing 63 changed files with 262 additions and 237 deletions.
5 changes: 5 additions & 0 deletions .codespellexclude
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ "fr", QString::fromUtf8(R"(une extension pour accéder les espaces de travail <a href="https://models.physiomeproject.org/">PMR</a> d'un utilisateur.)") }
{ "fr", QString::fromUtf8("une extension qui fournit une fonction d'addition.") }
{ "fr", QString::fromUtf8("Tolérance absolue") }
if (modelCode.contains("defint(func")) {
auto requestor = new O1Requestor(this, mPmrAuthentication, this);
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cd
name: CD

on:
push:
Expand Down Expand Up @@ -28,7 +28,7 @@ jobs:
BUILDCACHE_LOG_FILE: ""
steps:
- name: Check out OpenCOR
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install Python
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: CI

on:
pull_request:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
BUILDCACHE_LOG_FILE: ""
steps:
- name: Check out OpenCOR
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install Python
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/spellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Spell check

on:
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
spell_check:
name: Spell check
runs-on: ubuntu-latest
steps:
- name: Check out OpenCOR
uses: actions/checkout@v4
- name: Spell check
uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
skip: ./i18n,./res/flags,./res/ui.qrc,./src/3rdparty,./src/plugins/thirdParty/Python/scripts,./src/plugins/thirdParty/PythonPackages/scripts,*_fr.ts,*.out,*.xml
exclude_file: .codespellexclude
ignore_words_list: filetests,pevent,pres,dependees
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
<translation>Le sujet dont la ressource est référencée (&quot;Biological Entity B&quot;) est une version ou une instance de l&apos;entité biologique représentée par l&apos;élément du modèle. Cette relation peut être utilisée pour représenter une isoforme ou forme modifiée d&apos;une entité biologique.</translation>
</message>
<message>
<source>Indentity</source>
<source>Identity</source>
<translation>Identité</translation>
</message>
<message>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void CellmlAnnotationViewEditingWidget::updateWebViewerWithQualifierDetails(WebV
shortDescription = tr("Version");
longDescription = tr(R"(The subject of the referenced resource ("Biological Entity B") is a version or an instance of the biological entity represented by the model element. This relation may be used to represent an isoform or modified form of a biological entity.)");
} else if (pQualifier == BioIs) {
shortDescription = tr("Indentity");
shortDescription = tr("Identity");
longDescription = tr(R"(The biological entity represented by the model element has identity with the subject of the referenced resource ("Biological Entity B"). This relation might be used to link a reaction to its exact counterpart in a database, for instance.)");
} else if (pQualifier == BioIsDescribedBy) {
shortDescription = tr("Description");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ void CellmlAnnotationViewMetadataEditDetailsWidget::addTerm()
termInformation[0], termInformation[1]);
}

// Disable the add term buton, now that we have added the term
// Disable the add term button, now that we have added the term

mAddTermButton->setEnabled(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ CellMLTextViewConverterWarnings CellMLTextViewConverter::warnings() const

QDomNode CellMLTextViewConverter::documentationNode() const
{
// Return our documentation ndoe
// Return our documentation node

return mDocumentationNode;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2910,7 +2910,7 @@ QDomElement CellmlTextViewParser::parseMathematicalFunction(QDomNode &pDomNode,

argumentElements << argumentElement;

// Check wheter we expect or might expect a second argument
// Check whether we expect or might expect a second argument

if ( ( pOneArgument && pTwoArguments
&& isTokenType(pDomNode, CellmlTextViewScanner::Token::Comma))
Expand All @@ -2934,7 +2934,7 @@ QDomElement CellmlTextViewParser::parseMathematicalFunction(QDomNode &pDomNode,
argumentElements << argumentElement;
}

// Check wheter we might expect more arguments
// Check whether we might expect more arguments

while ( pTwoArguments && pMoreArguments
&& isTokenType(pDomNode, CellmlTextViewScanner::Token::Comma)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ EditorWidget::EditorWidget * CellMLTextViewPlugin::editorWidget(const QString &p

//==============================================================================

bool CellMLTextViewPlugin::isEditorWidgetUseable(const QString &pFileName) const
bool CellMLTextViewPlugin::isEditorWidgetUsable(const QString &pFileName) const
{
// Return whether the requested editor widget is useable
// Return whether the requested editor widget is usable

return mViewWidget->isEditorWidgetUseable(pFileName);
return mViewWidget->isEditorWidgetUsable(pFileName);
}

//==============================================================================
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/editing/CellMLTextView/src/cellmltextviewwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ void CellmlTextViewWidget::initialize(const QString &pFileName, bool pUpdate)

editingWidget->editorWidget()->setReadOnly(true);
// Note: EditingViewPlugin::filePermissionsChanged() will do the
// same as above, but this will take a wee bit of time while
// we want it done straightaway...
// same as above, but this will take a bit of time while we
// want it done straight away...

editingWidget->editorListWidget()->addItem(EditorWidget::EditorListItem::Type::Error,
mConverter.errorLine(),
Expand Down Expand Up @@ -724,9 +724,9 @@ QWidget * CellmlTextViewWidget::widget(const QString &pFileName)

//==============================================================================

bool CellmlTextViewWidget::isEditorWidgetUseable(const QString &pFileName) const
bool CellmlTextViewWidget::isEditorWidgetUsable(const QString &pFileName) const
{
// Return whether the requested editor widget is useable
// Return whether the requested editor widget is usable

CellmlTextViewWidgetData *data = mData.value(pFileName);

Expand Down Expand Up @@ -1300,7 +1300,7 @@ void CellmlTextViewWidget::mathmlConversionDone(const QString &pContentMathml,
// Note: before setting the contents of our viewer, we need to make sure
// that pInput is still our current Content MathML equation. Indeed,
// say that updateViewer() gets called many times in a short period of
// time (e.g. as a result of replacing all the occurences of a
// time (e.g. as a result of replacing all the occurrences of a
// particular string with another one) and that some of those calls
// don't require an XSL transformation, then we may end up in a case
// where pInput is not our current Content MathML equation anymore, in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class CellmlTextViewWidget : public Core::ViewWidget

QWidget * widget(const QString &pFileName) override;

bool isEditorWidgetUseable(const QString &pFileName) const;
bool isEditorWidgetUsable(const QString &pFileName) const;
bool isEditorWidgetContentsModified(const QString &pFileName) const;

bool saveFile(const QString &pOldFileName, const QString &pNewFileName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ along with this program. If not, see <https://gnu.org/licenses>.

VIRTUAL EditorWidget::EditorWidget * editorWidget(const QString &pFileName) const PURE_OR_OVERRIDE;

VIRTUAL bool isEditorWidgetUseable(const QString &pFileName) const PURE_OR_OVERRIDE;
VIRTUAL bool isEditorWidgetUsable(const QString &pFileName) const PURE_OR_OVERRIDE;
VIRTUAL bool isEditorWidgetContentsModified(const QString &pFileName) const PURE_OR_OVERRIDE;
#include "interfaceend.h"

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/editing/EditingView/src/editingviewplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ void EditingViewPlugin::updateGui(const QString &pFileName)

if (mEditor != nullptr) {
mEditor->setReadOnly( !Core::FileManager::instance()->isReadableAndWritable(pFileName)
|| !mEditingViewInterface->isEditorWidgetUseable(pFileName));
|| !mEditingViewInterface->isEditorWidgetUsable(pFileName));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ EditorWidget::EditorWidget * RawCellMLViewPlugin::editorWidget(const QString &pF

//==============================================================================

bool RawCellMLViewPlugin::isEditorWidgetUseable(const QString &pFileName) const
bool RawCellMLViewPlugin::isEditorWidgetUsable(const QString &pFileName) const
{
Q_UNUSED(pFileName)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ void RawCellmlViewWidget::mathmlConversionDone(const QString &pContentMathml,
// Note: before setting the contents of our viewer, we need to make sure
// that pInput is still our current Content MathML equation. Indeed,
// say that updateViewer() gets called many times in a short period of
// time (e.g. as a result of replacing all the occurences of a
// time (e.g. as a result of replacing all the occurrences of a
// particular string with another one) and that some of those calls
// don't require an XSL transformation, then we may end up in a case
// where pInput is not our current Content MathML equation anymore, in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ EditorWidget::EditorWidget * RawSEDMLViewPlugin::editorWidget(const QString &pFi

//==============================================================================

bool RawSEDMLViewPlugin::isEditorWidgetUseable(const QString &pFileName) const
bool RawSEDMLViewPlugin::isEditorWidgetUsable(const QString &pFileName) const
{
Q_UNUSED(pFileName)

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/editing/RawTextView/src/rawtextviewplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ EditorWidget::EditorWidget * RawTextViewPlugin::editorWidget(const QString &pFil

//==============================================================================

bool RawTextViewPlugin::isEditorWidgetUseable(const QString &pFileName) const
bool RawTextViewPlugin::isEditorWidgetUsable(const QString &pFileName) const
{
Q_UNUSED(pFileName)

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/guiinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ QAction * Menu::action() const

QMenu * Menu::menu() const
{
// Return the menu itsef
// Return the menu itself

return mMenu;
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/miscellaneous/Core/res/web-xslt/ctopff.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ match="m:apply[*[1][self::m:determinant]][*[2][self::m:matrix]]" priority="2">
</mrow>
</x:template>

<!-- make 1-(9-2) google code isse 3-->
<!-- make 1-(9-2) google code issue 3-->
<x:template name="binary" >
<x:param name="mo"/>
<x:param name="p" select="0"/>
Expand Down Expand Up @@ -2126,7 +2126,7 @@ match="m:apply[*[1][self::m:determinant]][*[2][self::m:matrix]]" priority="2">
</x:template>


<!-- mathml 3 addtitions -->
<!-- mathml 3 additions -->

<x:template match="m:cs">
<ms>
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/miscellaneous/Core/src/centralwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ void CentralWidget::loadSettings(QSettings &pSettings)
setTabBarCurrentIndex(mFileTabs, 0);
}

// Retrieve the seleted modes and views, in case there are no files
// Retrieve the selected modes and views, in case there are no files

if (mFileNames.isEmpty()) {
ViewInterface::Mode fileMode = ViewInterface::modeFromString(pSettings.value(QString(SettingsFileMode).arg(QString())).toString());
Expand Down Expand Up @@ -1389,7 +1389,7 @@ void CentralWidget::addView(Plugin *pPlugin)

mModes.value(viewMode)->setEnabled(true);

// Keep track of the correspondance mode type/index
// Keep track of the correspondence mode type/index

mModeTabIndexModes.insert(tabIndex, viewMode);
mModeModeTabIndexes.insert(viewMode, tabIndex);
Expand Down Expand Up @@ -1908,9 +1908,9 @@ void CentralWidget::fileChanged(const QString &pFileName, bool pFileChanged,
// The given file and/or one or several of its dependencies has changed,
// so ask the user whether to reload the given file
// Note: we temporarily disable the fact that our file manager can check
// its fiels. Indeed, we are going to show a message box and this
// its fields. Indeed, we are going to show a message box and this
// would normally result in our file manager stopping its timer
// and then restarting it straightaway once our message box
// and then restarting it straight away once our message box
// disappears (see FileManager::focusWindowChanged()). So, if we
// were not to do this, the fileChanged() signal would be handled
// a second time before we get a chance to reload the changed
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/miscellaneous/Core/src/collapsiblewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ void CollapsibleHeaderWidget::setLastHeader(bool pLastHeader)

//==============================================================================

bool CollapsibleHeaderWidget::isCollapsable() const
bool CollapsibleHeaderWidget::isCollapsible() const
{
// Return wheter we are collapsable
// Return whether we are collapsible

return !mButton->icon().isNull();
}
Expand All @@ -179,7 +179,7 @@ bool CollapsibleHeaderWidget::isCollapsable() const

bool CollapsibleHeaderWidget::isCollapsed() const
{
// Return wheter we are collapsed
// Return whether we are collapsed

return mCollapsed;
}
Expand Down Expand Up @@ -317,7 +317,7 @@ int CollapsibleWidget::count() const

bool CollapsibleWidget::isCollapsed(int pIndex) const
{
// Return wheter our requested header is collapsed
// Return whether our requested header is collapsed

return (mHeaders.value(pIndex) != nullptr)?mHeaders[pIndex]->isCollapsed():false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/miscellaneous/Core/src/collapsiblewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CORE_EXPORT CollapsibleHeaderWidget : public QWidget
void setFirstHeader(bool pFirstHeader);
void setLastHeader(bool pLastHeader);

bool isCollapsable() const;
bool isCollapsible() const;

bool isCollapsed() const;
void setCollapsed(bool pCollapsed);
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/miscellaneous/Core/src/commonwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ void CommonWidget::showBusyWidget(double pProgress)
mParent->setEnabled(false);
}

// Make sure that our busy widget is shown straightaway
// Make sure that our busy widget is shown straight away
// Note: indeed, depending on the operating system (e.g. macOS) and on
// what we do next (e.g. retrieving a remote file), our busy
// widget may or may not show straightaway...
// widget may or may not show straight away...

QCoreApplication::sendPostedEvents();
QCoreApplication::processEvents();
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/miscellaneous/Core/src/corecliutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ void stringLineColumnAsPosition(const QString &pString, const QString &pEol,
// given string using the given end of line

if ((pLine < 1) || (pColumn < 1)) {
// Invalid line and/or colunn values
// Invalid line and/or column values

pPosition = -1;
} else {
Expand Down
Loading

0 comments on commit 986f2c4

Please sign in to comment.