Граф коммитов

45 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 792a223c37
[autoformat] Fix running sed on Linux. (#18254)
The autoformat action doesn't necessarily run on macOS, and sed's syntax is
different between macOS and Linux - so make sure to cope with these
differences.

Also execute the nullability fixes in a separate subshell to not interfere
with the rest of the script.

This fixes an issue where autoformat would fail with:

    + sed -i '' -e 's/!= null/is not null/g' -e 's/== null/is null/g' builds/fix-maccatalyst-assembly/Program.cs
    sed: can't read : No such file or directory
2023-05-11 07:27:47 +02:00
Rolf Bjarne Kvinge 36af029204
Change all null checking expressions to use 'is' and 'is not'. (#18176)
Change all null checking expressions to use 'is null' and 'is not null'
instead of '== null' and '!= null'.

This was mostly done with sed, so code can probably be improved in many
other ways with manual inspection, but that will come over time.

Also add code to the autoformat script to automatically fix these issues in the future.
2023-05-05 17:52:19 +02:00
Rolf Bjarne Kvinge 614a16a358
[autoformat] Fix line endings for localization output. (#17407)
Ref: https://github.com/xamarin/xamarin-macios/pull/17403
2023-02-01 16:59:42 +01:00
Rolf Bjarne Kvinge 294314a518
[autoformat] Add the rest of the repository. (#16974) 2022-12-07 09:13:36 +01:00
Rolf Bjarne Kvinge aa5444ff2b
[autoformat] Add all of src/. (#16958) 2022-12-06 11:07:43 +01:00
Rolf Bjarne Kvinge 1c80823582
[autoformat] Add all of tests/. (#16857) 2022-12-05 08:23:34 +01:00
Rolf Bjarne Kvinge 94c83d5595
[autoformat] Add the rest of the subdirectories in src/. (#16854) 2022-11-23 07:48:08 +01:00
Rolf Bjarne Kvinge 09da0bdfeb
[autoformat] Add the MetalKit, MetalPerformanceShaders, MobileCoreServices, ModelIO, MultipeerConnectivity, NaturalLanguage and NearbyInteraction frameworks. (#16829) 2022-11-21 20:52:01 +01:00
Rolf Bjarne Kvinge 8ad6a27a12
[autoformat] Add the iAd, iTunesLibrary, WebKit, WatchKit and WatchConnectivity frameworks. (#16831) 2022-11-21 12:06:40 +01:00
Rolf Bjarne Kvinge 9ce7b75a42
[autoformat] Add the OpenGL framework. (#16833) 2022-11-21 12:05:46 +01:00
Rolf Bjarne Kvinge 0076cd9920
[autoformat] Add .NET tests. (#16811) 2022-11-21 09:45:49 +01:00
Rolf Bjarne Kvinge ae140f245a
[autoformat] Add the PassKit, PdfKit, Photos, PhotosUI, PrintCore, QTKit, QuickLookUI, ReplayKit, SafariServices, ScreenCaptureKit, ScriptingBridge and SearchKit frameworks. (#16775) 2022-11-18 15:21:16 +01:00
Rolf Bjarne Kvinge ce895603a5
[autoformat] Add the rest of tools. (#16801) 2022-11-17 17:18:34 -05:00
Rolf Bjarne Kvinge 2f538ba790
[autoformat] Add the Network, NetworkExtension and NotificationCenter frameworks. (#16795) 2022-11-17 17:12:32 -05:00
Rolf Bjarne Kvinge 8ad9df8523
[autoformat] Add generator tests. (#16800) 2022-11-17 17:04:21 -05:00
Rolf Bjarne Kvinge 3585c66844
[autoformat] Add common test files. (#16740) 2022-11-17 13:04:59 +01:00
Rolf Bjarne Kvinge 0a0076c6b0
[autoformat] Add the SceneKit framework. (#16780) 2022-11-17 13:04:46 +01:00
Rolf Bjarne Kvinge bd4394816a
[autoformat] Add UIKit. (#16779) 2022-11-17 13:02:14 +01:00
Rolf Bjarne Kvinge 0140122668
[autoformat] Add the Security, SensorKit, Social, SpriteKit, StoreKit, SystemConfiguration, TVServices, VideoToolbox, Vision and WKWebKit frameworks. (#16763) 2022-11-16 07:38:18 +01:00
Rolf Bjarne Kvinge 4a626c2ac5
[autoformat] Add the IOSurface, ImageCaptureCore, ImageIO, ImageKit, Intents, JavaScriptCore, LocalAuthentication, MLCompute, MapKit, MediaAccessibility, MediaLibrary, MediaPlayer and MediaToolbox frameworks. (#16755) 2022-11-15 17:41:59 +01:00
Rolf Bjarne Kvinge 76c6c67fa8
[autoformat] Add the GLKit, GameController, GameKit, GameplayKit, HealthKit and HomeKit frameworks. (#16716) 2022-11-15 07:34:27 +01:00
Rolf Bjarne Kvinge 3b839e1551
[autoformat] Add msbuild tests. (#16717) 2022-11-14 08:58:59 +01:00
Rolf Bjarne Kvinge c4c0d35a7f
[autoformat] Add the CoreWlan, EventKit, EventKitUI, ExternalAccessory, FileProvider, FinderSync and Foundation frameworks. (#16714)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-11-11 08:21:20 +01:00
Rolf Bjarne Kvinge ca42f2644d
[autoformat] Add the CoreServices, CoreTelephony, CoreText and CoreVideo frameworks. (#16700) 2022-11-10 18:00:29 +01:00
Rolf Bjarne Kvinge 6f45caa84d
[autoformat] Add monotouch-test (#16701) 2022-11-10 17:59:26 +01:00
Rolf Bjarne Kvinge d65b74a936
[autoformat] Add the CoreHaptics, CoreImage, CoreLocation, CoreML, CoreMedia, CoreMidi and CoreMotion frameworks. (#16689)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-11-10 10:29:40 +01:00
Rolf Bjarne Kvinge 5f1d270cb3
[autoformat] Add the CoreGraphics framework. (#16644) 2022-11-09 14:10:06 +01:00
Rolf Bjarne Kvinge bc95efb0ae
[autoformat] Add xtro. (#16622) 2022-11-08 17:44:13 +01:00
Rolf Bjarne Kvinge 5738468652
[autoformat] Add the CoreFoundation framework. (#16619) 2022-11-08 07:40:22 +01:00
Rolf Bjarne Kvinge 78229568e7
[autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
Rolf Bjarne Kvinge d017c532df
[autoformat] Add the Contacts, CoreAnimation, CoreBluetooth and CoreData frameworks. (#16490) 2022-11-04 15:50:14 +01:00
Rolf Bjarne Kvinge f4a51ec110
[autoformat] Add the BackgroundTasks, BusinessChat, CFNetwork, CarPlay, Chip, ClockKit, CloudKit and Compression frameworks. (#16459) 2022-10-25 23:56:21 +02:00
Rolf Bjarne Kvinge 54aea86a91
[autoformat] Add siminstaller.csproj. (#16457) 2022-10-25 23:49:54 +02:00
Rolf Bjarne Kvinge 750df1f566
[autoformat] Add bgen.csproj. (#16456) 2022-10-25 22:47:07 +02:00
Rolf Bjarne Kvinge 746cefd228
[autoformat] Add the AppKit framework. (#16359) 2022-10-17 17:54:19 +02:00
Rolf Bjarne Kvinge 74816f347f
[autoformat] Add the AudioToolbox and AudioUnit frameworks. (#16360) 2022-10-17 17:53:50 +02:00
Rolf Bjarne Kvinge 59cfcd6b3e
[autoformat] Add the ARKit, AVFoundation, AVKit, AdSupport, AssetsLibrary and AuthenticationServices frameworks. (#16348) 2022-10-17 08:22:58 +02:00
Rolf Bjarne Kvinge e43b53b574
[autoformat] Add the AddressBook[UI] frameworks. (#16343) 2022-10-14 16:14:36 +02:00
Rolf Bjarne Kvinge 598178e78f
[autoformat] Add the Accelerate, Accessibility and Accounts frameworks. (#16340) 2022-10-14 09:15:58 +02:00
Rolf Bjarne Kvinge 7659696c23
[autoformat] Add xharness.csproj. (#16322) 2022-10-13 23:10:08 +02:00
Rolf Bjarne Kvinge 2d9f9c3d1f
[autoformat] Add mtouch.csproj. (#16316)
This also required modifying mtouch.csproj, otherwise the wrong settings would
be applied.
2022-10-13 10:42:41 +02:00
Rolf Bjarne Kvinge ee7e95dd69
[autoformat] Add mmp.csproj. (#16313) 2022-10-11 22:36:58 +02:00
Rolf Bjarne Kvinge fa778b50e8
[autoformat] Add the DotNetUnitTests project to the projects to autoformat. (#16257) 2022-10-07 08:05:53 +02:00
Rolf Bjarne Kvinge f22ecb5f05
[autoformat] Add xtro projects to the projects to autoformat. (#16239) 2022-10-06 07:30:47 +02:00
Rolf Bjarne Kvinge 4046acc3d0
[autoformat] Extract some logic into its own script file. (#16200)
We have some problems when autoformatting PRs and the PR branch isn't fully
up-to-date with regards to the target branch.

I believe this is what happens:

1. When a PR is created (or modified), GitHub Actions will merge the PR branch
   with the target branch, and parse/load the merged *.yml files.
2. Then when we run the autoformatter, we're working on the tip of the PR
   branch (and not the merged result).
3. This means that we were using the list of projects to autoformat from the
   merged branch, but exeuting on the PR branch. This resulted in spurious
   autoformatting, because the autoformatted would autoformat more code than
   expected.

The fix I'm implementing is to move the list of projects to autoformat to a
separate script in source code. That way we'll work upon the list of projects
as they show up in the PR branch, and not the merged results.
2022-10-03 22:18:28 +02:00