def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) flag = mkflag('override') option_group.add_option(flag, action='append', dest='ivy_resolve_overrides', help='''Specifies a jar dependency override in the form: [org]#[name]=(revision|url) For example, to specify 2 overrides: %(flag)s=com.foo#bar=0.1.2 \\ %(flag)s=com.baz#spam=file:///tmp/spam.jar ''' % dict(flag=flag)) report = mkflag("report") option_group.add_option(report, mkflag("report", negate=True), dest = "ivy_resolve_report", action="callback", callback=mkflag.set_bool, default=False, help = "[%default] Generate an ivy resolve html report") option_group.add_option(mkflag("open"), mkflag("open", negate=True), dest="ivy_resolve_open", default=False, action="callback", callback=mkflag.set_bool, help="[%%default] Attempt to open the generated ivy resolve report " "in a browser (implies %s)." % report) option_group.add_option(mkflag("outdir"), dest="ivy_resolve_outdir", help="Emit ivy report outputs in to this directory.") option_group.add_option(mkflag("cache"), dest="ivy_resolve_cache", help="Use this directory as the ivy cache, instead of the " \ "default specified in pants.ini.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag("skip"), mkflag("skip", negate=True), dest="checkstyle_skip", default=False, action="callback", callback=mkflag.set_bool, help="[%default] Skip checkstyle.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option( mkflag("warnings"), mkflag("warnings", negate=True), dest="scala_compile_warnings", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Compile scala code with all configured warnings " "enabled.") option_group.add_option( mkflag("plugins"), dest="plugins", default=None, action="append", help="Use these scalac plugins. Default is set in pants.ini.") option_group.add_option(mkflag("partition-size-hint"), dest="scala_compile_partition_size_hint", action="store", type="int", default=-1, help="Roughly how many source files to attempt to compile together. Set to a large number to compile " \ "all sources together. Set this to 0 to compile target-by-target. Default is set in pants.ini.") option_group.add_option(mkflag("color"), mkflag("color", negate=True), dest="scala_compile_color", action="callback", callback=mkflag.set_bool, help="[True] Enable color in logging.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option( mkflag("warnings"), mkflag("warnings", negate=True), dest="scala_compile_warnings", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Compile scala code with all configured warnings " "enabled.", ) option_group.add_option( mkflag("plugins"), dest="plugins", default=None, action="append", help="Use these scalac plugins. Default is set in pants.ini.", ) option_group.add_option( mkflag("partition-size-hint"), dest="scala_compile_partition_size_hint", action="store", type="int", default=-1, help="Roughly how many source files to attempt to compile together. Set to a large number " "to compile all sources together. Set this to 0 to compile target-by-target. " "Default is set in pants.ini.", ) JvmDependencyCache.setup_parser(option_group, args, mkflag)
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option( mkflag("warnings"), mkflag("warnings", negate=True), dest="java_compile_warnings", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Compile java code with all configured warnings " "enabled.") option_group.add_option(mkflag("args"), dest="java_compile_args", action="append", help="Pass these extra args to javac.") option_group.add_option( mkflag("partition-size-hint"), dest="java_compile_partition_size_hint", action="store", type="int", default=-1, help= "Roughly how many source files to attempt to compile together. Set" " to a large number to compile all sources together. Set this to 0" " to compile target-by-target. Default is set in pants.ini.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option( mkflag('warnings'), mkflag('warnings', negate=True), dest='scala_compile_warnings', default=True, action='callback', callback=mkflag.set_bool, help='[%default] Compile scala code with all configured warnings ' 'enabled.') option_group.add_option( mkflag('plugins'), dest='plugins', default=None, action='append', help='Use these scalac plugins. Default is set in pants.ini.') option_group.add_option(mkflag('partition-size-hint'), dest='scala_compile_partition_size_hint', action='store', type='int', default=-1, help='Roughly how many source files to attempt to compile together. Set to a large number ' \ 'to compile all sources together. Set this to 0 to compile target-by-target. ' \ 'Default is set in pants.ini.') JvmDependencyCache.setup_parser(option_group, args, mkflag)
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) flag = mkflag('override') option_group.add_option( flag, action='append', dest='ivy_resolve_overrides', help='''Specifies a jar dependency override in the form: [org]#[name]=(revision|url) For example, to specify 2 overrides: %(flag)s=com.foo#bar=0.1.2 \\ %(flag)s=com.baz#spam=file:///tmp/spam.jar ''' % dict(flag=flag)) report = mkflag("report") option_group.add_option( report, mkflag("report", negate=True), dest="ivy_resolve_report", action="callback", callback=mkflag.set_bool, default=False, help="[%default] Generate an ivy resolve html report") option_group.add_option( mkflag("open"), mkflag("open", negate=True), dest="ivy_resolve_open", default=False, action="callback", callback=mkflag.set_bool, help="[%%default] Attempt to open the generated ivy resolve report " "in a browser (implies %s)." % report) option_group.add_option( mkflag("outdir"), dest="ivy_resolve_outdir", help="Emit ivy report outputs in to this directory.") option_group.add_option( mkflag("cache"), dest="ivy_resolve_cache", help="Use this directory as the ivy cache, instead of the " "default specified in pants.ini.") option_group.add_option(mkflag("args"), dest="ivy_args", action="append", default=[], help="Pass these extra args to ivy.") option_group.add_option( mkflag("mutable-pattern"), dest="ivy_mutable_pattern", help= "If specified, all artifact revisions matching this pattern will " "be treated as mutable unless a matching artifact explicitly " "marks mutable as False.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option( mkflag("warnings"), mkflag("warnings", negate=True), dest="scala_compile_warnings", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Compile scala code with all configured warnings " "enabled.") option_group.add_option( mkflag("flatten"), mkflag("flatten", negate=True), dest="scala_compile_flatten", action="callback", callback=mkflag.set_bool, help="[%default] Compile scala code for all dependencies in a " "single compilation.") option_group.add_option(mkflag("color"), mkflag("color", negate=True), dest="scala_compile_color", action="callback", callback=mkflag.set_bool, help="[True] Enable color in logging.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag("warnings"), mkflag("warnings", negate=True), dest="scala_compile_warnings", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Compile scala code with all configured warnings " "enabled.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option( mkflag("warnings"), mkflag("warnings", negate=True), dest="java_compile_warnings", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Compile java code with all configured warnings " "enabled.")
def setup_parser(subcls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag('warnings'), mkflag('warnings', negate=True), dest=subcls._language+'_compile_warnings', default=True, action='callback', callback=mkflag.set_bool, help='[%default] Compile with all configured warnings enabled.') option_group.add_option(mkflag('partition-size-hint'), dest=subcls._language+'_partition_size_hint', action='store', type='int', default=-1, help='Roughly how many source files to attempt to compile together. Set to a large number ' 'to compile all sources together. Set this to 0 to compile target-by-target. ' 'Default is set in pants.ini.') option_group.add_option(mkflag('missing-deps'), dest=subcls._language+'_missing_deps', choices=['off', 'warn', 'fatal'], default='warn', help='[%default] One of off, warn, fatal. ' 'Check for missing dependencies in ' + subcls._language + 'code. ' 'Reports actual dependencies A -> B where there is no ' 'transitive BUILD file dependency path from A to B.' 'If fatal, missing deps are treated as a build error.') option_group.add_option(mkflag('missing-direct-deps'), dest=subcls._language+'_missing_direct_deps', choices=['off', 'warn', 'fatal'], default='off', help='[%default] One of off, warn, fatal. ' 'Check for missing direct dependencies in ' + subcls._language + ' code. ' 'Reports actual dependencies A -> B where there is no direct ' 'BUILD file dependency path from A to B. ' 'This is a very strict check, as in practice it is common to rely on ' 'transitive, non-direct dependencies, e.g., due to type inference or when ' 'the main target in a BUILD file is modified to depend on other targets in ' 'the same BUILD file as an implementation detail. It may still be useful ' 'to set it to fatal temorarily, to detect these.') option_group.add_option(mkflag('unnecessary-deps'), dest=subcls._language+'_unnecessary_deps', choices=['off', 'warn', 'fatal'], default='off', help='[%default] One of off, warn, fatal. ' 'Check for declared dependencies in ' + subcls._language + ' code ' 'that are not needed. This is a very strict check. For example, ' 'generated code will often legitimately have BUILD dependencies that ' 'are unused in practice.')
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag("warnings"), mkflag("warnings", negate=True), dest="java_compile_warnings", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Compile java code with all configured warnings " "enabled.") option_group.add_option(mkflag("partition-size-hint"), dest="java_compile_partition_size_hint", action="store", type="int", default=-1, help="Roughly how many source files to attempt to compile together. Set to a large number to compile "\ "all sources together. Set this to 0 to compile target-by-target. Default is set in pants.ini.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag("warnings"), mkflag("warnings", negate=True), dest="java_compile_warnings", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Compile java code with all configured warnings " "enabled.") option_group.add_option(mkflag("flatten"), mkflag("flatten", negate=True), dest="java_compile_flatten", action="callback", callback=mkflag.set_bool, help="[%default] Compile java code for all dependencies in a " "single compilation.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) flag = mkflag('override') option_group.add_option( flag, action='append', dest='ivy_resolve_overrides', help='''Specifies a jar dependency override in the form: [org]#[name]=(revision|url) For example, to specify 2 overrides: %(flag)s=com.foo#bar=0.1.2 \\ %(flag)s=com.baz#spam=file:///tmp/spam.jar ''' % dict(flag=flag)) report = mkflag("report") option_group.add_option( report, mkflag("report", negate=True), dest="ivy_resolve_report", action="callback", callback=mkflag.set_bool, default=False, help="[%default] Generate an ivy resolve html report") option_group.add_option( mkflag("open"), mkflag("open", negate=True), dest="ivy_resolve_open", default=False, action="callback", callback=mkflag.set_bool, help="[%%default] Attempt to open the generated ivy resolve report " "in a browser (implies %s)." % report) option_group.add_option( mkflag("outdir"), dest="ivy_resolve_outdir", help="Emit ivy report outputs in to this directory.") option_group.add_option(mkflag("cache"), dest="ivy_resolve_cache", help="Use this directory as the ivy cache, instead of the " \ "default specified in pants.ini.")
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag('warnings'), mkflag('warnings', negate=True), dest='scala_compile_warnings', default=True, action='callback', callback=mkflag.set_bool, help='[%default] Compile scala code with all configured warnings ' 'enabled.') option_group.add_option(mkflag('plugins'), dest='plugins', default=None, action='append', help='Use these scalac plugins. Default is set in pants.ini.') option_group.add_option(mkflag('partition-size-hint'), dest='scala_compile_partition_size_hint', action='store', type='int', default=-1, help='Roughly how many source files to attempt to compile together. Set to a large number ' \ 'to compile all sources together. Set this to 0 to compile target-by-target. ' \ 'Default is set in pants.ini.') JvmDependencyCache.setup_parser(option_group, args, mkflag)
def setup_parser(subcls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option( mkflag('missing-deps'), dest=subcls._language + '_missing_deps', choices=['off', 'warn', 'fatal'], # TODO(Benjy): Change to fatal after we iron out all outstanding missing deps. default='warn', help='[%default] One of off, warn, fatal. ' 'Check for missing dependencies in ' + subcls._language + 'code. ' 'Reports actual dependencies A -> B where there is no ' 'transitive BUILD file dependency path from A to B.' 'If fatal, missing deps are treated as a build error.') option_group.add_option( mkflag('missing-direct-deps'), dest=subcls._language + '_missing_direct_deps', choices=['off', 'warn', 'fatal'], default='off', help='[%default] One of off, warn, fatal. ' 'Check for missing direct dependencies in ' + subcls._language + ' code. ' 'Reports actual dependencies A -> B where there is no direct ' 'BUILD file dependency path from A to B. ' 'This is a very strict check, as in practice it is common to rely on ' 'transitive, non-direct dependencies, e.g., due to type inference or when ' 'the main target in a BUILD file is modified to depend on other targets in ' 'the same BUILD file as an implementation detail. It may still be useful ' 'to set it to fatal temorarily, to detect these.') option_group.add_option( mkflag('unnecessary-deps'), dest=subcls._language + '_unnecessary_deps', choices=['off', 'warn', 'fatal'], default='off', help='[%default] One of off, warn, fatal. ' 'Check for declared dependencies in ' + subcls._language + ' code ' 'that are not needed. This is a very strict check. For example, ' 'generated code will often legitimately have BUILD dependencies that ' 'are unused in practice.')
def setup_parser(cls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) flag = mkflag('override') option_group.add_option(flag, action='append', dest='ivy_resolve_overrides', help='''Specifies a jar dependency override in the form: [org]#[name]=(revision|url) For example, to specify 2 overrides: %(flag)s=com.foo#bar=0.1.2 \\ %(flag)s=com.baz#spam=file:///tmp/spam.jar ''' % dict(flag=flag)) report = mkflag("report") option_group.add_option(report, mkflag("report", negate=True), dest = "ivy_resolve_report", action="callback", callback=mkflag.set_bool, default=False, help = "[%default] Generate an ivy resolve html report") option_group.add_option(mkflag("open"), mkflag("open", negate=True), dest="ivy_resolve_open", default=False, action="callback", callback=mkflag.set_bool, help="[%%default] Attempt to open the generated ivy resolve report " "in a browser (implies %s)." % report) option_group.add_option(mkflag("outdir"), dest="ivy_resolve_outdir", help="Emit ivy report outputs in to this directory.") option_group.add_option(mkflag("cache"), dest="ivy_resolve_cache", help="Use this directory as the ivy cache, instead of the " "default specified in pants.ini.") option_group.add_option(mkflag("args"), dest="ivy_args", action="append", default=[], help = "Pass these extra args to ivy.") option_group.add_option(mkflag("mutable-pattern"), dest="ivy_mutable_pattern", help="If specified, all artifact revisions matching this pattern will " "be treated as mutable unless a matching artifact explicitly " "marks mutable as False.")
def setup_parser(subcls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag('missing-deps'), dest=subcls._language+'_missing_deps', choices=['off', 'warn', 'fatal'], # TODO(Benjy): Change to fatal after we iron out all outstanding missing deps. default='warn', help='[%default] One of off, warn, fatal. ' 'Check for missing dependencies in ' + subcls._language + 'code. ' 'Reports actual dependencies A -> B where there is no ' 'transitive BUILD file dependency path from A to B.' 'If fatal, missing deps are treated as a build error.') option_group.add_option(mkflag('missing-direct-deps'), dest=subcls._language+'_missing_direct_deps', choices=['off', 'warn', 'fatal'], default='off', help='[%default] One of off, warn, fatal. ' 'Check for missing direct dependencies in ' + subcls._language + ' code. ' 'Reports actual dependencies A -> B where there is no direct ' 'BUILD file dependency path from A to B. ' 'This is a very strict check, as in practice it is common to rely on ' 'transitive, non-direct dependencies, e.g., due to type inference or when ' 'the main target in a BUILD file is modified to depend on other targets in ' 'the same BUILD file as an implementation detail. It may still be useful ' 'to set it to fatal temorarily, to detect these.') option_group.add_option(mkflag('unnecessary-deps'), dest=subcls._language+'_unnecessary_deps', choices=['off', 'warn', 'fatal'], default='off', help='[%default] One of off, warn, fatal. ' 'Check for declared dependencies in ' + subcls._language + ' code ' 'that are not needed. This is a very strict check. For example, ' 'generated code will often legitimately have BUILD dependencies that ' 'are unused in practice.')
def setup_parser(subcls, option_group, args, mkflag): NailgunTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag('warnings'), mkflag('warnings', negate=True), dest=subcls._language+'_compile_warnings', default=True, action='callback', callback=mkflag.set_bool, help='[%default] Compile with all configured warnings enabled.') option_group.add_option(mkflag('partition-size-hint'), dest=subcls._language+'_partition_size_hint', action='store', type='int', default=-1, help='Roughly how many source files to attempt to compile together. ' 'Set to a large number to compile all sources together. Set this ' 'to 0 to compile target-by-target. Default is set in pants.ini.') option_group.add_option(mkflag('missing-deps'), dest=subcls._language+'_missing_deps', choices=['off', 'warn', 'fatal'], default='warn', help='[%default] One of off, warn, fatal. ' 'Check for missing dependencies in ' + subcls._language + 'code. ' 'Reports actual dependencies A -> B where there is no ' 'transitive BUILD file dependency path from A to B.' 'If fatal, missing deps are treated as a build error.') option_group.add_option(mkflag('missing-direct-deps'), dest=subcls._language+'_missing_direct_deps', choices=['off', 'warn', 'fatal'], default='off', help='[%default] One of off, warn, fatal. ' 'Check for missing direct dependencies in ' + subcls._language + ' code. Reports actual dependencies A -> B where there is no ' 'direct BUILD file dependency path from A to B. This is a very ' 'strict check, as in practice it is common to rely on transitive, ' 'non-direct dependencies, e.g., due to type inference or when the ' 'main target in a BUILD file is modified to depend on other ' 'targets in the same BUILD file as an implementation detail. It ' 'may still be useful to set it to fatal temorarily, to detect ' 'these.') option_group.add_option(mkflag('unnecessary-deps'), dest=subcls._language+'_unnecessary_deps', choices=['off', 'warn', 'fatal'], default='off', help='[%default] One of off, warn, fatal. Check for declared ' 'dependencies in ' + subcls._language + ' code that are not ' 'needed. This is a very strict check. For example, generated code ' 'will often legitimately have BUILD dependencies that are unused ' 'in practice.') option_group.add_option(mkflag('delete-scratch'), mkflag('delete-scratch', negate=True), dest=subcls._language+'_delete_scratch', default=True, action='callback', callback=mkflag.set_bool, help='[%default] Leave intermediate scratch files around, ' 'for debugging build problems.')