Skip to content

cpp Configuration

moznion edited this page Apr 22, 2020 · 2 revisions

CPP formatter configuration.

Example

lazy val root = (project in file("."))
  .settings(
    name := "Example",
    spotlessCpp := CppConfig(
      eclipseCpp = EclipseCppConfig(),
    ),
  )

Setting Key

spotlessCpp: CppConfig

Description

This configuration accepts to embed Formatter Common Configuration.

Default target

  • ${baseDir}/**/*.c
  • ${baseDir}/**/*.h
  • ${baseDir}/**/*.C
  • ${baseDir}/**/*.cpp
  • ${baseDir}/**/*.cxx
  • ${baseDir}/**/*.cc
  • ${baseDir}/**/*.c++
  • ${baseDir}/**/*.h
  • ${baseDir}/**/*.hpp
  • ${baseDir}/**/*.hh
  • ${baseDir}/**/*.hxx
  • ${baseDir}/**/*.inc

Items

eclipseCpp: EclipseCppConfig

Default Value: no value

The formatter configuration for Eclipse cdt Formatter.

Example

eclipseCpp = EclipseCppConfig(
  version = null,
  configFiles = null,
)

Items

version: String

Default Value: depends on dependent Spotless version

The version of Eclipse cdt Formatter.

Supported versions are on the following: https://github.com/diffplug/spotless/tree/master/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter

configFiles: Seq[File]

Default Value: empty list

A seq of files for cpp eclipse configuration

licenseHeader: CppLicenseStringHeaderConfig

default value: null

License header string to prefix a that before the package statement.

licenseHeaderFile: CppLicenseFileHeaderConfig

default value: null

License header file to prefix a that before the package statement.