328 Commits

Author SHA1 Message Date
Mike McQuaid
9216d8abe6
rubocop-rails: make fixes. 2020-12-02 10:43:04 +00:00
Markus Reiter
0424940496 Add types for ENV extensions. 2020-11-23 02:06:37 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Mike McQuaid
3bea3a6953
Merge pull request #9055 from EricFromCanada/apidoc-improvements
Launder comments for improved rubydoc output
2020-11-06 09:45:42 +00:00
Jonathan Chang
65ae58282f Fix type inference error
Tapioca doesn't like identical argument names.
2020-11-06 17:54:34 +11:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
EricFromCanada
dddfbf80fc apidoc: add/update yard tags 2020-11-06 00:16:35 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
e3646c9b4e Remove unneeded back-references. 2020-09-19 02:03:56 +02:00
Markus Reiter
276c570c16 Pass individual args explicitly to ENV extensions. 2020-07-28 02:52:45 +02:00
Markus Reiter
25b3632c4c Pass args to ENV instead of using global args. 2020-07-25 03:57:43 +02:00
Mike McQuaid
f951ea83d4
Fix brew style. 2020-07-07 12:23:29 +01:00
Mike McQuaid
e5d15c8b19
Merge branch 'master' into argv-cleanup-26 2020-05-23 13:44:42 +01:00
Mike McQuaid
3588e6a5c6
bottle_arch: ensure a symbol is used when needed.
Fixes #7597.
2020-05-19 08:47:59 +01:00
Mike McQuaid
1c656fb584
Merge pull request #7538 from MikeMcQuaid/bottle_arch
Replace ARGV#bottle_arch with Homebrew.args.bottle_arch
2020-05-11 08:46:57 +01:00
Mike McQuaid
5f721c6986
Cleanup ARGV.include? usage
Remove usage where `Homebrew.args` could be used instead or, due to the
`Homebrew.args` parsing, there was dead code that was never executed
(and no-one complained about not working).
2020-05-10 15:28:31 +01:00
Mike McQuaid
07b19cba09
Replace ARGV#bottle_arch with Homebrew.args.bottle_arch
Part of https://github.com/Homebrew/brew/issues/5730
2020-05-10 15:15:41 +01:00
Mike McQuaid
20a1199375
Refactor CLI to remove unless args_parsed
Refactor the CLI::Args module so it doesn't have different paths to
check arguments depending on whether the arguments have been parsed or
not. Instead, set the values we need from the global ARGV at
first, global initialisation time where they will be thrown away when
the actual arguments are parsed.

To do this some other general refactoring was needed:
- more methods made private when possible
- e.g. `HEAD?` used consistently instead of `head` before arguments
  are parsed.
- formula options are only parsed after named arguments are extracted
2020-05-05 17:47:51 +01:00
Gautham G
b40e33aeb8 ARGV: Deprecate ARGV.cc and replace with Homebrew.args.cc 2020-05-04 11:14:55 +05:30
Bo Anderson
3717815ade ENV/std: fix error when using older/no clang
Fixes #7482.
2020-05-02 13:33:32 +01:00
Gautham G
b0ac5bab31
ARGV: Deprecate ARGV.build_bottle? and replace with Homebrew.args.build_bottle 2020-04-26 13:28:44 +01:00
Bo Anderson
df47668113 ENV/std: conditionally apply AES-NI workaround 2020-04-12 14:50:49 +01:00
Bo Anderson
757cc24f7e ENV/std: restore original make_jobs return type 2020-04-08 20:31:04 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Issy Long
1f6168fe8a
Change regexp.match?(string) to string.match?(regexp) everywhere
- Only try to call `.match?` on strings that aren't nil.
2019-10-13 23:22:51 +01:00
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Issy Long
b78028b9c2
Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
1aa8ad09e2
Deprecate macOS versions below Mavericks
And remove all dead/unneeded code.
2019-01-27 12:27:47 +00:00
Mike McQuaid
170c5493a4
Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Claudia
a72af2c8a6
Disable cop for #set_cpu_flags, #set_cpu_cflags
In `extend/ENV/std.rb`, the methods `set_cpu_flags` and
`set_cpu_cflags` have been violating the `Naming/AccessorMethodName`
cop.

A recent modification in #7e13b3749 woke up the cop. That means we’re
likely dealing with legacy code here, predating the introduction of
RuboCop into Homebrew.

This commit disables the cop for either method. I believe refactoring
wouldn’t currently be worth the effort, especially given that
`#set_cpu_cflags` is mostly called without arguments.
2019-01-08 08:13:25 +01:00
Mike McQuaid
7e13b37495
ENV: default CFLAGS to bottle values.
This reduces the deviation in compilation flags on a given OS between
users and between bottling/not bottling to provide a consistent
behaviour for debugging and support.
2019-01-06 21:27:15 +00:00
Mike McQuaid
e6e534157c
ENV/super: copy Hackintosh comment from ENV/std. 2018-12-20 20:09:45 +00:00
Shaun Jackman
d75f5dacfa test: Fix ENV.cxx11
ENV.cxx11 in a test block fails on Linux with
Error: ibex: failed
An exception occurred within a child process:
NoMethodError: undefined method `non_apple_gcc_version'
See for example brew test ibex on Linux.
2018-12-13 15:46:12 -08:00
EricFromCanada
20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04:00
Viktor Szakats
a0d971a0d0 secure/fix URLs 2018-10-03 21:21:05 +00:00
Shaun Jackman
4addff3b2b determine_optflags: Default is -march=native 2018-10-03 11:41:39 -07:00
Shaun Jackman
1cdc34eec3 Default compiler is gcc on Linux 2018-09-30 11:20:35 -07:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Mike McQuaid
a2febc8971
Revert "std: use HOMEBREW_ARCH env var on Linux" 2018-09-06 09:16:13 +01:00
Caleb Xu
90c25bf913 std: use HOMEBREW_ARCH env var on Linux
Unlike macOS, Linux installations can be installed/deployed on a
variety of hardware. The HOMEBREW_ARCH environment variable
allows the end user to set a custom -march=... option for the
compiler. If the variable is not set, it defaults to "native".

This only applies on Linux; on macOS, behavior remains unchanged.
2018-09-05 16:06:11 -04:00
Shaun Jackman
e752e583d6 Add LD_* environment variables to SANITIZED_VARS
Sanitize the Linux environment variables
LD_LIBRARY_PATH LD_PRELOAD LD_RUN_PATH
2018-08-14 11:45:40 -07:00
Mike McQuaid
4fe0adf587
shared: fix HOMEBREW_CCCFG reference. 2018-07-12 19:59:06 +01:00
Maxim Belkin
67ea581e4a
extend/ENV/shared.rb: [new method] append_to_cccfg
append_to_cccfg properly appends values to HOMEBREW_CCCFG variable
2018-07-12 12:20:38 -05:00
Maxim Belkin
bb82f05952
Properly append values to HOMEBREW_CCCFG 2018-07-12 12:19:04 -05:00
Mike McQuaid
14364bbaee extend/ENV: support CX11 for LLVM Clang.
Fix some checks for `:clang` which should match for either `:clang` or
`:llvm_clang`. Note that's not every check.
2018-07-05 20:15:57 +01:00