Add Rubocop CI (#7083)

* Rename IgnoredPatterns to AllowedPatterns.

* Exclude docopt.rb (not our code) from Rubocop

* Disable Style/RedundantReturn

* Disable Style/MutableConstant

* Disable Style/NumericLiterals

* Set Layout/IndentationStyle to spaces

* Temporarily disable various cops.

* Add Rubocop CI via Octocop

* Lint tree with rubocop -A -c .rubocop.yml

Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
Maximilian Downey Twiss
2022-08-23 03:31:25 +10:00
committed by GitHub
parent 4c0f15a6f3
commit de24923ee8
1144 changed files with 7527 additions and 7515 deletions

View File

@@ -9,17 +9,17 @@ class Intltool < Package
source_url 'https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz'
source_sha256 '67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd'
binary_url ({
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/intltool/0.51.0-1_armv7l/intltool-0.51.0-1-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/intltool/0.51.0-1_armv7l/intltool-0.51.0-1-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/intltool/0.51.0-1_i686/intltool-0.51.0-1-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/intltool/0.51.0-1_x86_64/intltool-0.51.0-1-chromeos-x86_64.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/intltool/0.51.0-1_x86_64/intltool-0.51.0-1-chromeos-x86_64.tar.xz'
})
binary_sha256 ({
binary_sha256({
aarch64: '47c82f3b2e4d6c2959ee1edf1d8dc480eb4e28e0bfac9efc823be7d937bfadcb',
armv7l: '47c82f3b2e4d6c2959ee1edf1d8dc480eb4e28e0bfac9efc823be7d937bfadcb',
i686: '41acb4802df44c0264e496a6a20c96a8db8bf5626d6214a72dee58f26a2caa9a',
x86_64: '128c16c438bcf23d0d9cc27afe947c7ece5e5ba96d96dd5838d3550f702bfe40',
x86_64: '128c16c438bcf23d0d9cc27afe947c7ece5e5ba96d96dd5838d3550f702bfe40'
})
depends_on 'libtool'
@@ -27,16 +27,17 @@ class Intltool < Package
depends_on 'patch' => :build
def self.patch
system "curl -#LO https://raw.githubusercontent.com/Alexpux/MSYS2-packages/master/intltool/perl-5.22-compatibility.patch"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('perl-5.22-compatibility.patch') ) == '9c6527072aada6e3cb9aceb6e07cfdf51d58839a2beb650168da0601a85ebda3'
system "patch intltool-update.in perl-5.22-compatibility.patch"
system 'curl -#LO https://raw.githubusercontent.com/Alexpux/MSYS2-packages/master/intltool/perl-5.22-compatibility.patch'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest(File.read('perl-5.22-compatibility.patch')) == '9c6527072aada6e3cb9aceb6e07cfdf51d58839a2beb650168da0601a85ebda3'
system 'patch intltool-update.in perl-5.22-compatibility.patch'
end
def self.build
system "./configure #{CREW_OPTIONS}"
system "make"
system 'make'
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
end
end