Get Involved/development/Easy: Difference between revisions

From KDE Community Wiki
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
Below are some easy ways to do merge requests (MR) for the KDE git repositories. And easy ways to contribute to the KDE Community.
Below are some easy ways to do merge requests (MR) for the KDE git repositories. And easy ways to contribute to the KDE Community.


== Spell check and grammar check a random KDE wiki page ==
You can find [[Get_Involved/development/IDE_configuration/Qt_Creator|here instructions on how to open a KDE git repository in the IDE Qt Creator]]. After you build that KDE git repository using kdesrc-build.
<pre>
Create a new Google Doc named “SpellCheck”.
In the web browser: Navigate to a KDE wiki page. E.g. https://community.kde.org/Get_Involved Ctrl+A Ctrl+C.
In the Google Doc: Ctrl+Shift+V. From the Google Doc main menu > Tools >
Spelling and grammar > Spelling and grammar check. It says that we should replace:
“KDE's Quality Assurance team tests pre-release software and proposed changed to make sure that everything works properly!”
with:
“KDE's Quality Assurance team tests pre-release software and proposed changes to make sure that everything works properly!”
In the web browser: edit the KDE wiki page to fix the spelling or grammar error.
</pre>


== You should be able to build all 400 KDE git repositories using kdesrc-build ==
== You should be able to build all 400 KDE git repositories using kdesrc-build ==
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
From time to time, make sure that all the KDE git repositories (continue to) build correctly using kdesrc-build. Run:
From time to time, make sure that all the KDE git repositories (continue to) build correctly using kdesrc-build. Run:
kdesrc-build
kdesrc-build
without parameters. That will build all 400 KDE git repositories. If a KDE git repository built successfully last week,
without parameters. That will build all 400 KDE git repositories. If a KDE git repository was building successfully last week,
but does not build successfully today, invest time to investigate why it stopped building, ask in the KDE Matrix channel
but does not build successfully today, invest time to investigate why it stopped building in a timeboxed manner. E.g. invest 10 minutes. Then, if needed, ask in the KDE Matrix room "KDE New Contributors" ( https://webchat.kde.org/#/room/#kde-welcome:kde.org ) if this module is supposed to build.
(e.g. https://webchat.kde.org/#/room/#kde-welcome:kde.org ) if this module is supposed to build.
 
Example: let's say that kcalc does not build.
In konsole, I would run:
 
kdesrc-build kcalc --no-src --no-include-dependencies --refresh-build --debug |& tee ~/a.txt


Example: let's say that kcalc does not build and that in ~/.config/kdesrc-buildrc I have:
In the web browser create a pastebin. E.g. https://pastebin.centos.org/ Paste the contents of the file ~/a.txt.
directory-layout invent
In konsole: I would run:
clear
rm -rf ~/kde/build/utilities/kcalc
kdesrc-build --no-include-dependencies --debug
In konsole main menu > Edit > Select All, Ctrl+Shift+C
In the web browser create a pastebin https://pastebin.centos.org/ Paste the contents of the clipboard.
Paste the URL of the new pastebin in the KDE matrix channel when requesting help.
Paste the URL of the new pastebin in the KDE matrix channel when requesting help.
</pre>
</pre>


== Spell check all GUI strings ==
== Spell check all GUI strings ==
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
The KDE git repos use GNU gettext and *.po files for translating the Graphical User Interface
The KDE git repos use GNU gettext and *.po files for translating the Graphical User Interface
elements such as buttons and menus.
elements such as buttons and menus.
Line 44: Line 31:
In konsole:
In konsole:
cd ~/kde/src
cd ~/kde/src
grep --include=en*.po -r msgid . | sort -u | sed 's/[^a-zA-Z ]/ /g' | tr 'A-Z ' 'a-z\n' | grep '[a-z]' | sort -u | comm -23 - <(sort /usr/share/dict/words) > ~/GuiWordsNotInDictionary.txt
grep --include=*.po -r msgid . | grep /en.*/ | sort -u | sed 's/[^a-zA-Z ]/ /g' | tr 'A-Z ' 'a-z\n' | grep '[a-z]' | sort -u | comm -23 - <(sort /usr/share/dict/words) > ~/GuiWordsNotInDictionary.txt
kate ~/GuiWordsNotInDictionary.txt
kate ~/GuiWordsNotInDictionary.txt


Line 64: Line 51:


== Call the cmake_minimum_required() command at the beginning of the top-level CMakeLists.txt file ==
== Call the cmake_minimum_required() command at the beginning of the top-level CMakeLists.txt file ==
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
* https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html :
* https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html :
"Note Call the cmake_minimum_required() command at the beginning of the
"Note Call the cmake_minimum_required() command at the beginning of the
Line 99: Line 86:


== Just running kdesrc-build should not create "Unstaged Changes" in the local clone of a KDE git repo==
== Just running kdesrc-build should not create "Unstaged Changes" in the local clone of a KDE git repo==
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
Build all the KDE git repositories using kdesrc-build. Run:
Build all the KDE git repositories using kdesrc-build. Run:
kdesrc-build
kdesrc-build
Line 121: Line 108:
</pre>
</pre>


== Fix g++ C++ compiler warning ==
== C++ ==
<pre>
 
=== Fix g++ C++ compiler warning ===
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
In konsole:
In konsole:
CXX=g++ kdesrc-build kcalc --debug | tee ~/buildoutput_gxx.txt
CXX=g++ kdesrc-build kcalc --debug |& tee ~/buildoutput_gxx.txt


Open the file ~/buildoutput.txt in a text editor. E.g. kate.
Open the file ~/buildoutput.txt in a text editor. E.g. kate.
Line 147: Line 136:
</pre>
</pre>


== Fix clang++ C++ compiler warning ==
=== Fix clang++ C++ compiler warning ===
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
Do exactly as for g++ above.
Do exactly as for g++ above.
Replace the first command line with:
Replace the first command line with:
CXX=clang++ kdesrc-build kcalc --debug | tee ~/buildoutput_clangxx.txt
CXX=clang++ kdesrc-build kcalc --debug |& tee ~/buildoutput_clangxx.txt
</pre>
</pre>


== Fix clangd C++ compiler warning ==
=== Fix clangd C++ compiler warning ===
 
=== Fix Clang-Tidy static analysis issue ===
<pre  style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
Build a KDE git repository using kdesrc-build. Open it in the IDE Qt Creator.
From Qt Creator main menu > Analyze > Clang-Tidy and Clazy... > press the Analyze button.


== Fix Clang-Tidy static analysis issue ==
<pre>
https://www.google.com/search?q=clang-tidy
https://www.google.com/search?q=clang-tidy
</pre>
</pre>


== Fix PVS-Studio static analysis issue ==
=== Fix PVS-Studio static analysis issue ===
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
https://www.youtube.com/watch?v=NHwPhaIfrZ4
https://www.youtube.com/watch?v=NHwPhaIfrZ4
https://www.youtube.com/watch?v=XInpWKwkn4w
https://www.youtube.com/watch?v=XInpWKwkn4w
</pre>
</pre>


== Fix Cppcheck static analysis issue ==
=== Fix Cppcheck static analysis issue ===
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
https://en.wikipedia.org/wiki/Cppcheck
https://en.wikipedia.org/wiki/Cppcheck
https://www.youtube.com/watch?v=5OYvQ4Mi_1I
https://www.youtube.com/watch?v=1TSeSVDI3_s
https://www.youtube.com/watch?v=1TSeSVDI3_s
Qt Creator has a plugin for cppcheck.
Build a KDE git repository using kdesrc-build. Open it in the IDE Qt Creator.
From Qt Creator main menu > Help > About Plugins > Code Analyzer > enable Cppcheck (experimental).
Restart Qt Creator. From Qt Creator main menu > Analyze > Cppcheck... > make sure that the content of the edit box "Custom arguments:" is "--inline-suppr" > press the Analyze button.
If the developer wants, the developer can disable the cppcheck warning for a source code line.
The man page for cppcheck says "--inline-suppr
Enable inline suppressions. Use them by placing comments in the form:
// cppcheck-suppress <CppcheckErrorID>
before the line to suppress.".
E.g. in the application kalk:
// cppcheck-suppress duplicateExpression
KNumber::NegInfinity / KNumber::NegInfinity,
Disables the cppcheck warning "kalk/knumber/tests/knumbertest.cpp:678: Same expression on both sides of '/'.".
After you have fixed all of the cppcheck warnings that you can. After you have suppressed in source code using comments all the cppcheck warnings that the developer wants to be suppressed. Create a cppcheck command line that returns success (exit status zero). And do a Merge Request such that the Continuous Integration (CI) will make sure that cppcheck returns success. E.g. https://invent.kde.org/plasma-mobile/kalk/-/merge_requests/43
</pre>
</pre>


== Fix KDE clazy static analysis issue ==
=== Fix KDE clazy static analysis issue ===
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
Build a KDE git repository using kdesrc-build. Open it in the IDE Qt Creator.
From Qt Creator main menu > Analyze > Clang-Tidy and Clazy... > press the Analyze button.
 
https://www.youtube.com/watch?v=Z6MENrBRYJI
https://www.youtube.com/watch?v=Z6MENrBRYJI
</pre>
</pre>


== Fix clang-format issue ==
=== Fix static analysis issue using Allen Winter's krazy ===
 
<pre  style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
Install krazy:
 
# Read https://github.com/Krazy-collection/krazy/blob/master/Install.txt
# Set up kdesrc-build using the kdesrc-build setup procedure.
kdesrc-build frameworks
 
mkdir -p ~/kde/misc && cd ~/kde/misc
git clone https://github.com/Krazy-collection/krazy.git
cd krazy
# Install the packages mentioned in chapter "Requirements" of https://github.com/Krazy-collection/krazy/blob/master/Install.txt . E.g.:
# sudo apt install libjson-perl libyaml-perl
 
# If you have installed Qt using kdesrc-build, prepend ~/kde/usr to some environment variables. E.g.:
# source ~/kde/build/kconfig/prefix.sh
./install.sh ~/kde/usr
source ~/kde/build/kconfig/prefix.sh
which krazy2
# Should say: ~/kde/usr/bin/krazy2
# Read the help:
krazy2 --help
# Test
krazy2 ~/kde/src/kconfig/src/core/*.{cpp,h}
 
Build a KDE git repository using kdesrc-build. Run krazy on the source code files of that KDE git repository:
 
kdesrc-build kconfig
krazy2 --brief --check-sets c++,qt5,kde5,foss --explain ~/kde/src/kconfig/src/core/*.{cpp,h}
# Says:
#Check for spelling errors [spelling]... 2 issues found
#        ~/kde/src/kconfig/src/core/kauthorized.h: line#45[of of] (1)
#        ~/kde/src/kconfig/src/core/kcoreconfigskeleton.h: line#805[for for] (1)
 
# The qt5 and kde5 check-sets also work for Qt6 and KDE Frameworks 6.
 
# Go over all of the source code files.
find ~/kde/src -type f -name "*.cpp" -print -exec bash -c  'echo "{}"; krazy2 --brief --check-sets c++,qt5,kde5,foss --explain "{}" ' \; |& tee ~/a.txt
</pre>
 
=== Use the new Qt signal slot syntax ===
 
https://wiki.qt.io/New_Signal_Slot_Syntax
 
== Fix deprecation issue ==
 
E.g. kDebug, kWarning and other symbols from ~/kde/usr/include/KF5/KDELibs4Support/kdebug.h are deprecated. Replace with e.g. the symbols in the family of qDebug from ~/kde/usr/include/QtCore/qlogging.h and ~/kde/usr/include/QtCore/qdebug.h .


== In a random KDE wiki page, make sure that all links work correctly ==
E.g. run kdesrc-build without parameters, this will git clone and build all KDE git repositories. Search in ~/kde/src (i.e. in all the KDE git repositories) using e.g. VS Code for a deprecated symbol. You find an affected source code file in the git repository X. Open that git repository correctly in Qt Creator. Make sure that the deprecated symbol really is the one you thought it is. Replace the deprecated symbol. Build, test, git commit, MR.
<pre>
 
== QML ==
 
=== qmllint ===
 
<pre  style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
# Get the source code of all of the KDE git repositories using kdesrc-build:
kdesrc-build --src-only
cd ~/kde/src
# As per https://www.kdab.com/kdab-contributions-qt-5-4-qmllint/
find . -type f -name "*.qml" -exec qmllint \{\} +
# Make sure that the list of warnings returned today is not longer than the list of warnings returned in a previous day.
</pre>
 
Note: Once the qmllint installed from you Linux distribution's packages has the feature "You can now ignore individual warnings by adding "// qmllint disable" in the line causing it. You may also specify one or more warning type to ignore ("// qmllint disable warningtype1 warningtype2...") which is preferable. This can also be done for entire blocks of code by using "// qmllint disable" in an empty line and ending it with "// qmllint enable"" https://codereview.qt-project.org/c/qt/qtdeclarative/+/351372/6 . Then we will be able to add comments in the "*.qml" files that have qmllint warnings. The end goal is that running qmllint on all of the "*.qml" files from all of the KDE git repositories should not show any qmllint warnings.
 
=== qmlscene ===
 
<pre  style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
# This is an advanced topic.
# Get the source code of all of the KDE git repositories using kdesrc-build:
kdesrc-build --src-only
cd ~/kde/src
find . -type f -name "*.qml" -print -exec bash -c  'echo "qmlscene {}"; qmlscene "{}" --quit' \; |& tee ~/a.txt
kate ~/a.txt &
# For now, ignore the errors of type:
# module "X" is not installed
# ReferenceError: Y is not defined
# Make sure that the list of warnings returned today is not longer than the list of warnings returned in a previous day.
</pre>
 
== KDE wiki ==
You should probably not edit old or archived wiki pages. E.g. https://community.kde.org/Schedules/Applications/17.04_Feature_Plan Do not edit wiki pages about an event from 10 years ago, e.g. https://community.kde.org/KDE_PIM/Meetings/Osnabrueck_4. Do not edit wiki pages about old technologies e.g. maemo, QtWebKit, KDE 4, Qt4, QBS etc.
 
=== Spell check and grammar check a random KDE wiki page ===
<pre  style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
E.g.
Create a new Google Doc named “SpellCheck”.
In the web browser:
https://community.kde.org/index.php?title=Special:Random
takes you to:
https://community.kde.org/Get_Involved Ctrl+A Ctrl+C.
 
In the Google Doc: Ctrl+Shift+V. From the Google Doc main menu > Tools >
Spelling and grammar > Spelling and grammar check. It says that we should replace:
"KDE's Quality Assurance team tests pre-release software and proposed changed to make sure that everything works properly!"
with:
"KDE's Quality Assurance team tests pre-release software and proposes changes to make sure that everything works properly!"
In the web browser: edit the KDE wiki page to fix the spelling or grammar error.
</pre>
 
=== In a random KDE wiki page, URL links should work correctly ===
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
E.g.
E.g.
In the web browser:
In the web browser:
Line 199: Line 312:
I.e. https://apps.kde.org/rkward/ .
I.e. https://apps.kde.org/rkward/ .
This URL is probably better than the other possibility: https://rkward.kde.org/ .
This URL is probably better than the other possibility: https://rkward.kde.org/ .
</pre>
=== In a random KDE wiki page, the wiki markup should be correct ===
<pre  style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
Learn wikipedia/mediawiki wiki markup syntax. E.g. https://www.mediawiki.org/wiki/Help:Formatting , https://www.mediawiki.org/wiki/Cheatsheet
E.g.
In the web browser:
https://community.kde.org/index.php?title=Special:Random
takes you to:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging
You should be logged in. You edit the page (in the left hand side of the page Actions > Edit).
You see that "=" is used instead of "==". https://www.mediawiki.org/wiki/Help:Formatting says "Section formatting – only at the beginning of the line ... == Level 2 == ... Skip Level 1, it is page name level.". So you replace all "=" with "==". Make sure that the Table of Contents stays the same.
E.g. https://community.kde.org/index.php?title=Guidelines_and_HOWTOs%2FBug_triaging&type=revision&diff=95496&oldid=95495
</pre>
</pre>


== KDE Craft ==
== KDE Craft ==
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
Besides kdesrc-build. KDE has another tool that can build KDE git repos: KDE Craft.
Besides kdesrc-build. KDE has another tool that can build KDE git repos: KDE Craft.
https://community.kde.org/Craft
https://community.kde.org/Craft
Line 216: Line 344:


== Run executable using a run time analyzer ==
== Run executable using a run time analyzer ==
<pre>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
This is neither easy, nor suitable for beginners.
This is neither easy, nor suitable for beginners.



Revision as of 17:22, 23 March 2023

Below are some easy ways to do merge requests (MR) for the KDE git repositories. And easy ways to contribute to the KDE Community.

You can find here instructions on how to open a KDE git repository in the IDE Qt Creator. After you build that KDE git repository using kdesrc-build.

You should be able to build all 400 KDE git repositories using kdesrc-build

From time to time, make sure that all the KDE git repositories (continue to) build correctly using kdesrc-build. Run:
kdesrc-build
without parameters. That will build all 400 KDE git repositories. If a KDE git repository was building successfully last week,
but does not build successfully today, invest time to investigate why it stopped building in a timeboxed manner. E.g. invest 10 minutes. Then, if needed, ask in the KDE Matrix room "KDE New Contributors" ( https://webchat.kde.org/#/room/#kde-welcome:kde.org ) if this module is supposed to build.

Example: let's say that kcalc does not build.
In konsole, I would run:

kdesrc-build kcalc --no-src --no-include-dependencies --refresh-build --debug |& tee ~/a.txt

In the web browser create a pastebin. E.g. https://pastebin.centos.org/ Paste the contents of the file ~/a.txt.
Paste the URL of the new pastebin in the KDE matrix channel when requesting help.

Spell check all GUI strings

The KDE git repos use GNU gettext and *.po files for translating the Graphical User Interface
elements such as buttons and menus.
Look through all of the KDE git repos, through all of the en*.po files
and make sure that there are no typos.

E.g. build all KDE git repos using kdesrc-build. Run:
kdesrc-build
without parameters.
In konsole:
cd ~/kde/src
grep --include=*.po -r msgid . | grep /en.*/ | sort -u | sed 's/[^a-zA-Z ]/ /g' | tr 'A-Z ' 'a-z\n' | grep '[a-z]' | sort -u | comm -23 - <(sort /usr/share/dict/words) > ~/GuiWordsNotInDictionary.txt
kate ~/GuiWordsNotInDictionary.txt

E.g. we find the probably wrong word "disactived".
In konsole:
cd ~/kde/src
code .
In VS Code:
Search for the word "disactived". Files to exclude "*.po".
There is just one single result:
~/kde/src/clementine/src/widgets/osd.cpp
line 251 "tr("Wii Remote %1: disactived")".
You edit file ~/kde/src/clementine/src/widgets/osd.cpp and replace:
disactived
with:
deactivated
With just this one line change in the source code, you do one git commit and one MR.

Call the cmake_minimum_required() command at the beginning of the top-level CMakeLists.txt file

* https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html :
"Note Call the cmake_minimum_required() command at the beginning of the
top-level CMakeLists.txt file even before calling the project() command.
It is important to establish version and policy settings before invoking
other commands whose behavior they may affect. See also policy CMP0000."

Find an affected KDE git repo where in the top level CMakeLists.txt before
cmake_minimum_required() exist non empty lines, no comment lines,
but lines that contain CMake source code.
Do a MR like https://invent.kde.org/graphics/kolourpaint/-/merge_requests/23

Example:
I install Microsoft Visual Studio Code and I make sure that "code" is in $PATH.
I build all KDE git repos:
kdesrc-build
without parameters.
In ~/.config/kdesrc-buildrc I have:
directory-layout invent
In konsole:
cd ~/kde/src
code . # This will start VS Code.
In VS Code main menu > View > Search Ctrl+Shift+F. In the Search field write:
cmake_minimum_required
in the field "files to include" write:
CMakeLists.txt
Press F4 one hundred times. It will go through all of the lines that contain
"cmake_minimum_required" in all of the files named "CMakeLists.txt".
You probably do not want to edit the CMakeLists.txt file from subdirectories named
like 3rdparty. These directories are a non KDE project, which has its upstream
git repo outside invent.kde.org. Fix the issues in third party libraries in their
upstream git repo.

Just running kdesrc-build should not create "Unstaged Changes" in the local clone of a KDE git repo

Build all the KDE git repositories using kdesrc-build. Run:
kdesrc-build
You should not see displayed the text:
* You had local changes to <ModuleName>, which have been re-applied.

In this case the issue is probably that the .gitignore file in the git repo is outdated.
E.g.
Install meld.
Let's say that kcalc is the git repo that reproduces this issue. You should have seen the text:
"* You had local changes to kcalc, which have been re-applied."
E.g. in ~/.config/kdesrc-buildrc I have:
directory-layout invent
In konsole: I would run:
meld ~/kde/src/frameworks/kconfig/.gitignore ~/kde/src/utilities/kcalc/.gitignore
In the diff viewer I can see that the last two lines in the file
~/kde/src/frameworks/kconfig/.gitignore are new and do not exist yet in
~/kde/src/utilities/kcalc/.gitignore. I copy the new lines to ~/kde/src/utilities/kcalc/.gitignore
such that the two .gitignore files are identical.
Then I do a MR like https://invent.kde.org/graphics/kamera/-/merge_requests/5

C++

Fix g++ C++ compiler warning

In konsole:
CXX=g++ kdesrc-build kcalc --debug |& tee ~/buildoutput_gxx.txt

Open the file ~/buildoutput.txt in a text editor. E.g. kate.
Search for the string "warning: ". It should appear tens of thousands of times.
Pick a build warning that seems simple enough to you. Invest time to fix one build warning.
Test that your fix is OK.
E.g. for kcalc built as shown above (i.e. in ~/.config/kdesrc-buildrc I have: "directory-layout invent").
In konsole:
rm -rf ~/kde/build/utilities/kcalc
kdesrc-build kcalc --no-src --no-include-dependencies --debug
# Make sure there are no errors
cd ~/kde/build/utilities/kcalc
make test
# Make sure there are no errors

If everything is OK, fix a single g++ build warning,
do a single git commit and do a single MR.

Again, one MR should contain just one git commit.
And one git commit should contain only a single type of fixes (e.g. one type of fix),
with only handful of source code lines changed (e.g. only one line changed).

Fix clang++ C++ compiler warning

Do exactly as for g++ above.
Replace the first command line with:
CXX=clang++ kdesrc-build kcalc --debug |& tee ~/buildoutput_clangxx.txt

Fix clangd C++ compiler warning

Fix Clang-Tidy static analysis issue

Build a KDE git repository using kdesrc-build. Open it in the IDE Qt Creator.
From Qt Creator main menu > Analyze > Clang-Tidy and Clazy... > press the Analyze button.

https://www.google.com/search?q=clang-tidy

Fix PVS-Studio static analysis issue

https://www.youtube.com/watch?v=NHwPhaIfrZ4
https://www.youtube.com/watch?v=XInpWKwkn4w

Fix Cppcheck static analysis issue

https://en.wikipedia.org/wiki/Cppcheck
https://www.youtube.com/watch?v=5OYvQ4Mi_1I
https://www.youtube.com/watch?v=1TSeSVDI3_s

Qt Creator has a plugin for cppcheck.
Build a KDE git repository using kdesrc-build. Open it in the IDE Qt Creator.
From Qt Creator main menu > Help > About Plugins > Code Analyzer > enable Cppcheck (experimental).
Restart Qt Creator. From Qt Creator main menu > Analyze > Cppcheck... > make sure that the content of the edit box "Custom arguments:" is "--inline-suppr" > press the Analyze button.

If the developer wants, the developer can disable the cppcheck warning for a source code line. 
The man page for cppcheck says "--inline-suppr
Enable inline suppressions. Use them by placing comments in the form:
// cppcheck-suppress <CppcheckErrorID>
before the line to suppress.".

E.g. in the application kalk:
// cppcheck-suppress duplicateExpression
KNumber::NegInfinity / KNumber::NegInfinity,
Disables the cppcheck warning "kalk/knumber/tests/knumbertest.cpp:678: Same expression on both sides of '/'.".

After you have fixed all of the cppcheck warnings that you can. After you have suppressed in source code using comments all the cppcheck warnings that the developer wants to be suppressed. Create a cppcheck command line that returns success (exit status zero). And do a Merge Request such that the Continuous Integration (CI) will make sure that cppcheck returns success. E.g. https://invent.kde.org/plasma-mobile/kalk/-/merge_requests/43

Fix KDE clazy static analysis issue

Build a KDE git repository using kdesrc-build. Open it in the IDE Qt Creator.
From Qt Creator main menu > Analyze > Clang-Tidy and Clazy... > press the Analyze button.

https://www.youtube.com/watch?v=Z6MENrBRYJI

Fix static analysis issue using Allen Winter's krazy

Install krazy:

# Read https://github.com/Krazy-collection/krazy/blob/master/Install.txt
# Set up kdesrc-build using the kdesrc-build setup procedure.
kdesrc-build frameworks

mkdir -p ~/kde/misc && cd ~/kde/misc
git clone https://github.com/Krazy-collection/krazy.git
cd krazy
# Install the packages mentioned in chapter "Requirements" of https://github.com/Krazy-collection/krazy/blob/master/Install.txt . E.g.:
# sudo apt install libjson-perl libyaml-perl

# If you have installed Qt using kdesrc-build, prepend ~/kde/usr to some environment variables. E.g.:
# source ~/kde/build/kconfig/prefix.sh
./install.sh ~/kde/usr
source ~/kde/build/kconfig/prefix.sh
which krazy2
# Should say: ~/kde/usr/bin/krazy2
# Read the help:
krazy2 --help
# Test
krazy2 ~/kde/src/kconfig/src/core/*.{cpp,h}

Build a KDE git repository using kdesrc-build. Run krazy on the source code files of that KDE git repository:

kdesrc-build kconfig
krazy2 --brief --check-sets c++,qt5,kde5,foss --explain ~/kde/src/kconfig/src/core/*.{cpp,h}
# Says:
#Check for spelling errors [spelling]... 2 issues found
#        ~/kde/src/kconfig/src/core/kauthorized.h: line#45[of of] (1)
#        ~/kde/src/kconfig/src/core/kcoreconfigskeleton.h: line#805[for for] (1)

# The qt5 and kde5 check-sets also work for Qt6 and KDE Frameworks 6.

# Go over all of the source code files.
find ~/kde/src -type f -name "*.cpp" -print -exec bash -c  'echo "{}"; krazy2 --brief --check-sets c++,qt5,kde5,foss --explain "{}" ' \; |& tee ~/a.txt

Use the new Qt signal slot syntax

https://wiki.qt.io/New_Signal_Slot_Syntax

Fix deprecation issue

E.g. kDebug, kWarning and other symbols from ~/kde/usr/include/KF5/KDELibs4Support/kdebug.h are deprecated. Replace with e.g. the symbols in the family of qDebug from ~/kde/usr/include/QtCore/qlogging.h and ~/kde/usr/include/QtCore/qdebug.h .

E.g. run kdesrc-build without parameters, this will git clone and build all KDE git repositories. Search in ~/kde/src (i.e. in all the KDE git repositories) using e.g. VS Code for a deprecated symbol. You find an affected source code file in the git repository X. Open that git repository correctly in Qt Creator. Make sure that the deprecated symbol really is the one you thought it is. Replace the deprecated symbol. Build, test, git commit, MR.

QML

qmllint

# Get the source code of all of the KDE git repositories using kdesrc-build:
kdesrc-build --src-only
cd ~/kde/src
# As per https://www.kdab.com/kdab-contributions-qt-5-4-qmllint/
find . -type f -name "*.qml" -exec qmllint \{\} +
# Make sure that the list of warnings returned today is not longer than the list of warnings returned in a previous day.

Note: Once the qmllint installed from you Linux distribution's packages has the feature "You can now ignore individual warnings by adding "// qmllint disable" in the line causing it. You may also specify one or more warning type to ignore ("// qmllint disable warningtype1 warningtype2...") which is preferable. This can also be done for entire blocks of code by using "// qmllint disable" in an empty line and ending it with "// qmllint enable"" https://codereview.qt-project.org/c/qt/qtdeclarative/+/351372/6 . Then we will be able to add comments in the "*.qml" files that have qmllint warnings. The end goal is that running qmllint on all of the "*.qml" files from all of the KDE git repositories should not show any qmllint warnings.

qmlscene

# This is an advanced topic.
# Get the source code of all of the KDE git repositories using kdesrc-build:
kdesrc-build --src-only
cd ~/kde/src
find . -type f -name "*.qml" -print -exec bash -c  'echo "qmlscene {}"; qmlscene "{}" --quit' \; |& tee ~/a.txt
kate ~/a.txt &
# For now, ignore the errors of type:
# module "X" is not installed
# ReferenceError: Y is not defined
# Make sure that the list of warnings returned today is not longer than the list of warnings returned in a previous day.

KDE wiki

You should probably not edit old or archived wiki pages. E.g. https://community.kde.org/Schedules/Applications/17.04_Feature_Plan Do not edit wiki pages about an event from 10 years ago, e.g. https://community.kde.org/KDE_PIM/Meetings/Osnabrueck_4. Do not edit wiki pages about old technologies e.g. maemo, QtWebKit, KDE 4, Qt4, QBS etc.

Spell check and grammar check a random KDE wiki page

E.g.
Create a new Google Doc named “SpellCheck”.
In the web browser:
https://community.kde.org/index.php?title=Special:Random
takes you to:
https://community.kde.org/Get_Involved Ctrl+A Ctrl+C.

In the Google Doc: Ctrl+Shift+V. From the Google Doc main menu > Tools >
Spelling and grammar > Spelling and grammar check. It says that we should replace:
"KDE's Quality Assurance team tests pre-release software and proposed changed to make sure that everything works properly!"
with:
"KDE's Quality Assurance team tests pre-release software and proposes changes to make sure that everything works properly!"
In the web browser: edit the KDE wiki page to fix the spelling or grammar error.

In a random KDE wiki page, URL links should work correctly

E.g.
In the web browser:
https://community.kde.org/index.php?title=Special:Random
takes you to:
https://community.kde.org/Incubator/Projects/Rkward
you click on the URL:
"Its features can be extended by plugins, and it's all free software (Above information from
the current Rkward homepage." http://rkward.sourceforge.net/wiki/Main_Page
This takes you to:
https://rkward.kde.org/Main_Page
which is a web page that does not exist.

Edit the KDE wiki such that you replace the invalid URL
"http://rkward.sourceforge.net/wiki/Main_Page" with a valid URL.
Which in this case is the canonical homepage of the project rkward.
I.e. https://apps.kde.org/rkward/ .
This URL is probably better than the other possibility: https://rkward.kde.org/ .

In a random KDE wiki page, the wiki markup should be correct

Learn wikipedia/mediawiki wiki markup syntax. E.g. https://www.mediawiki.org/wiki/Help:Formatting , https://www.mediawiki.org/wiki/Cheatsheet

E.g.
In the web browser:
https://community.kde.org/index.php?title=Special:Random
takes you to:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging
You should be logged in. You edit the page (in the left hand side of the page Actions > Edit).

You see that "=" is used instead of "==". https://www.mediawiki.org/wiki/Help:Formatting says "Section formatting – only at the beginning of the line ... == Level 2 == ... Skip Level 1, it is page name level.". So you replace all "=" with "==". Make sure that the Table of Contents stays the same. 
E.g. https://community.kde.org/index.php?title=Guidelines_and_HOWTOs%2FBug_triaging&type=revision&diff=95496&oldid=95495

KDE Craft

Besides kdesrc-build. KDE has another tool that can build KDE git repos: KDE Craft.
https://community.kde.org/Craft

E.g. choose a KDE git repo. E.g. kcalc.
Choose one of the operating systems supported by KDE Craft.
One of Microsoft Windows, Apple macOS, Linux or FreeBSD. E.g. Linux.
Create a Linux VM, install KDE Craft in this VM.
In konsole:
craft kcalc
Run the newly built/downloaded and installed kcalc.

Run executable using a run time analyzer

This is neither easy, nor suitable for beginners.

Build a KDE git repo that is not a framework or a library.
I.e. build a KDE app.
Make sure that you have kdesrc-build configured to build using
CMake build configuration "Debug".
I.e. in ~/.config/kdesrc-buildrc I have:
cmake-options -DCMAKE_BUILD_TYPE=Debug

E.g. build kcalc:
In konsole:
kdesrc-build kcalc
Then run kcalc under valgrind.

If valgrind says that there is an issue.
And if the issue is not in Mesa or in Qt.
But the issue is in one of the KDE git repos, e.g. a memory leak.
valgrind will say the line where the leak occurs.