How To Install uncrustify on Fedora 34

uncrustify is Reformat Source

Introduction

In this tutorial we learn how to install uncrustify on Fedora 34.

What is uncrustify

Source Code Beautifier for C, C++, C#, D, Java, and Pawn

We can use yum or dnf to install uncrustify on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install uncrustify.

Install uncrustify on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install uncrustify using dnf by running the following command:

sudo dnf -y install uncrustify

Install uncrustify on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install uncrustify using yum by running the following command:

sudo yum -y install uncrustify

How To Uninstall uncrustify on Fedora 34

To uninstall only the uncrustify package we can use the following command:

sudo dnf remove uncrustify

uncrustify Package Contents on Fedora 34

/usr/bin/uncrustify
/usr/lib/.build-id
/usr/lib/.build-id/85
/usr/lib/.build-id/85/5c2b6980faf125ab6bbe940116195a20c1a216
/usr/share/doc/uncrustify
/usr/share/doc/uncrustify/AUTHORS
/usr/share/doc/uncrustify/BUGS
/usr/share/doc/uncrustify/COPYING
/usr/share/doc/uncrustify/ChangeLog
/usr/share/doc/uncrustify/HELP
/usr/share/doc/uncrustify/NEWS
/usr/share/doc/uncrustify/README.md
/usr/share/doc/uncrustify/documentation
/usr/share/doc/uncrustify/documentation/align-thresholds.txt
/usr/share/doc/uncrustify/documentation/example.c
/usr/share/doc/uncrustify/documentation/goals.txt
/usr/share/doc/uncrustify/documentation/how_to_format_cpp_lambda_functions.rst
/usr/share/doc/uncrustify/documentation/htdocs
/usr/share/doc/uncrustify/documentation/htdocs/align_typedef.html
/usr/share/doc/uncrustify/documentation/htdocs/ben.cfg.txt
/usr/share/doc/uncrustify/documentation/htdocs/config.txt
/usr/share/doc/uncrustify/documentation/htdocs/configuration.txt
/usr/share/doc/uncrustify/documentation/htdocs/default.cfg
/usr/share/doc/uncrustify/documentation/htdocs/examples
/usr/share/doc/uncrustify/documentation/htdocs/examples/c-1.in.c
/usr/share/doc/uncrustify/documentation/htdocs/examples/c-1.out.c
/usr/share/doc/uncrustify/documentation/htdocs/examples/example.c
/usr/share/doc/uncrustify/documentation/htdocs/images
/usr/share/doc/uncrustify/documentation/htdocs/images/linuxlinks.gif
/usr/share/doc/uncrustify/documentation/htdocs/index.html
/usr/share/doc/uncrustify/documentation/htdocs/linux.cfg.txt
/usr/share/doc/uncrustify/documentation/htdocs/options.html
/usr/share/doc/uncrustify/documentation/htdocs/options_ASM.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Align.html
/usr/share/doc/uncrustify/documentation/htdocs/options_CLI_NET.html
/usr/share/doc/uncrustify/documentation/htdocs/options_C_sharp.html
/usr/share/doc/uncrustify/documentation/htdocs/options_D.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Indenting.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Java.html
/usr/share/doc/uncrustify/documentation/htdocs/options_ModifyCode.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Namespace.html
/usr/share/doc/uncrustify/documentation/htdocs/options_NewLines.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Objectiv-C.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Positioning.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Preprocessor.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Assign.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Byref.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Case.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Cast.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Class.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Comma.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Enum.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_For.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_New.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Operator.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Paren.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Space_Template.html
/usr/share/doc/uncrustify/documentation/htdocs/options_Spaces.html
/usr/share/doc/uncrustify/documentation/htdocs/project-support.jpg
/usr/share/doc/uncrustify/documentation/htdocs/uncrustify.css
/usr/share/doc/uncrustify/documentation/htdocs/uncrustify.html
/usr/share/doc/uncrustify/documentation/overview.odt
/usr/share/doc/uncrustify/documentation/paren_stack.txt
/usr/share/doc/uncrustify/documentation/theory.txt
/usr/share/doc/uncrustify/documentation/threads.txt
/usr/share/doc/uncrustify/examples
/usr/share/doc/uncrustify/examples/MS-calling_conventions.cfg
/usr/share/doc/uncrustify/examples/amxmodx.cfg
/usr/share/doc/uncrustify/examples/ben.cfg
/usr/share/doc/uncrustify/examples/ben2.cfg
/usr/share/doc/uncrustify/examples/d.cfg
/usr/share/doc/uncrustify/examples/defaults.cfg
/usr/share/doc/uncrustify/examples/freebsd.cfg
/usr/share/doc/uncrustify/examples/gnu-indent.cfg
/usr/share/doc/uncrustify/examples/klaus.cfg
/usr/share/doc/uncrustify/examples/kr-indent.cfg
/usr/share/doc/uncrustify/examples/linux-indent.cfg
/usr/share/doc/uncrustify/examples/linux.cfg
/usr/share/doc/uncrustify/examples/mono.cfg
/usr/share/doc/uncrustify/examples/msvc.cfg
/usr/share/doc/uncrustify/examples/objc.cfg
/usr/share/doc/uncrustify/examples/sun.cfg
/usr/share/doc/uncrustify/examples/xsupplicant.cfg
/usr/share/licenses/uncrustify
/usr/share/licenses/uncrustify/COPYING
/usr/share/man/man1/uncrustify.1.gz

References

Summary

In this tutorial we learn how to install uncrustify on Fedora 34 using yum and dnf.