Commit Graph

7 Commits

Author SHA1 Message Date
Phaedrus Leeds
600e18567c Add a vim modeline and .editorconfig
To make indentation work with less effort. The modeline was copied from
libostree with minor modification and the .editorconfig from GLib.

The advantage of having both a modeline and an editorconfig is we can
work out of the box on more editor setups, and the modeline allows us to
specify the style with a lot more fine grained control.
2022-08-22 19:48:10 -07:00
Alexander Larsson
a988ee19d8 decompose: Use FlatpakDecomposed for bundles 2020-11-10 14:32:13 +01:00
Matthew Leeds
e8816b7663 Remove extra newlines in variable definiton blocks
Uncrustify has an option "nl_func_var_def_blk" which is supposed to
ensure there's a newline character between the block of variable
definitions and the rest of the function body, but it gets confused and
thinks that the first instance of "g_autoptr" or "g_auto" being used on
a variable is the start of the function body. So this commit removes
those extra newline characters and removes that option in uncrustify.cfg
so they don't get re-added the next time uncrustify is run.

Here's the command I used:

perl -0777 -i -pe 's/\n(\n\s*g_auto\()/\1/g' `git ls-tree --name-only
-r HEAD | grep \\\.[ch]$ | grep -v common/valgrind-private.h |
grep -v app/flatpak-polkit-agent-text-listener\\\.[ch]`

I ran it again with "g_autoptr" in place of "g_auto", and made a few
manual edits to add back the newline when the g_auto* was in the middle
of a function body rather than at the top.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthias Clasen
c284777d61 Add more api docs for libflatpak
Bring the library docs much closer to completion.

Closes: #2053
Approved by: alexlarsson
2018-09-03 10:31:51 +00:00
Alexander Larsson
3f4518b15c Run uncrustify
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
491d174879 Make p2p build non-optional
Closes: #1800
Approved by: alexlarsson
2018-06-19 18:10:56 +00:00
Alexander Larsson
efb92704fe Merge lib/* into common
This moves all the files from lib into common, and it also adds all the libflatpak
sources into libflatpak-common, making libflatpak just a wrapper around the common
helper library.

This move allows the CLI to use all the code from libflatpak. We were already doing
this with a few things like flatpak-error*.[ch], and we want to do it even more
when sharing FlatpakTransaction. This also allows use to slowly move
the CLI to using the libflatpak apis for some things.

Closes: #1706
Approved by: alexlarsson
2018-05-24 11:59:52 +00:00