Age | Commit message (Collapse) | Author |
|
The CaseSensitive option requires clang-format 12 which is not widely
available.
Remove the option, to fix clang-format uses until a solution which
supports clang-format version specific configurations can be merged.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Utilise the clang-format header sort to provide a regex based pattern
match for our header inclusion coding style.
The rules are updated to match as closely as possible the existing
practices and the documentation is updated accordingly.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
We aim to ensure that our includes are alphabetically sorted. Whilst
checkstyle.py also handles this, enable the clang-format explicitly to
define the code-style requirement, and allow clang-format to also
correct un-sorted header includes.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The libcamera coding style allows functions to be defined on a single
line only when they're inline. Update the clang-format configuration
accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add all options available in the new version that were previously
commented out (or just not listed). The commented out value is replaced
by the clang-format-7 default where they differ, to avoid changing the
current behaviour.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The GPL-2.0 SPDX identifier is deprecated, replace it with GPL-2.0-only.
The files in include/linux/ are not touched as they're copied verbatim
from the kernel sources.
Rename the GPL-2.0.txt license file to GPL-2.0-only.txt, and add a
GPL-2.0.txt symlink to support the include/linux/ headers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Our coding style doesn't indent namespace contents. Update .clang-format
accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Our coding style doesn't require a space after the template keyword.
Adjust .clang-format accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
This produces code with the ternary operators at the beginning instead of the
end of the line:
return caps_.isMultiplanar() ? getFormatMultiplane(fmt)
: getFormatSingleplane(fmt);
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The initial clang-format options are copied from the Linux kernel style,
with the following differences:
- Use C++11
- Remove the line length limit (to keep the original line breaks)
- Don't indent access modifiers
- Allow short inline functions on a single line
- Move braces to next line after class definition
- Keep braces on the line of the namespace definition
- Replace for-each macros
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|