danger-xcode_summary 0.5.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -0
- data/.rubocop.yml +4 -0
- data/.travis.yml +8 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +83 -57
- data/Guardfile +2 -0
- data/README.md +17 -30
- data/Rakefile +2 -0
- data/danger-xcode_summary.gemspec +5 -4
- data/lib/xcode_summary/gem_version.rb +1 -1
- data/lib/xcode_summary/plugin.rb +103 -141
- data/spec/fixtures/build_error.xcresult/Data/data.0~8rlpy8Zk2MdRSU0KgHQ-dzLsgOGyu-14Vc-N0xpF5NjTgHQgt3Y2C80SFK9G34F8tFCT42Ddo_9fUgkxBW3O9w== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/data.0~IRr5bjJHBy3PCL5WuT9beYwr1YJflTZAOvsiw4f8sjvfJO1N516fkBcRW8rzgz3AkdAAidUfmPabPcZq3iarbA== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/data.0~M95TCFtTnRKHBi17FlVGNc2kRMfbb_nRcsKPCf3ttPQyiTHHtDZhXhZ7cyeQ_qQ4zMKPS6y7I0oN4BKz0S4Uwg== +1 -0
- data/spec/fixtures/build_error.xcresult/Data/data.0~R8E9aNLCgS5_YXRF2Ugae_CaCFKR0ScZt9yP6r7ov-20PVARt7VwmAHWg2P6EBKQXm2TML95dp7BNnz9vunkBw== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/data.0~YHIIkYp8-XSCi9oQYeEXZLa8EYpvUizVzEQGN5YmnJtTfJ4ujBdfy2EVAk8cUl8jtQskdFE84I-7eu59N9_pLA== +1 -0
- data/spec/fixtures/build_error.xcresult/Data/data.0~oBktD27DLW9QTHTv0MDsoaN2N6qCqZMwiFJeX7RwARc9fFan5V2awd_aThA9ZdCFTmHTSrdRglfQ5-ry9bJBUQ== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/data.0~sMF2ys5sALLwuAv5pBXjiul46mqlgymNeLHDD_y99cE5gPqv8vL-IHIBlpnlNYSO4VvKHlaNafxanp-NDJTh-A== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/refs.0~8rlpy8Zk2MdRSU0KgHQ-dzLsgOGyu-14Vc-N0xpF5NjTgHQgt3Y2C80SFK9G34F8tFCT42Ddo_9fUgkxBW3O9w== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/refs.0~IRr5bjJHBy3PCL5WuT9beYwr1YJflTZAOvsiw4f8sjvfJO1N516fkBcRW8rzgz3AkdAAidUfmPabPcZq3iarbA== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/refs.0~M95TCFtTnRKHBi17FlVGNc2kRMfbb_nRcsKPCf3ttPQyiTHHtDZhXhZ7cyeQ_qQ4zMKPS6y7I0oN4BKz0S4Uwg== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/refs.0~R8E9aNLCgS5_YXRF2Ugae_CaCFKR0ScZt9yP6r7ov-20PVARt7VwmAHWg2P6EBKQXm2TML95dp7BNnz9vunkBw== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/refs.0~YHIIkYp8-XSCi9oQYeEXZLa8EYpvUizVzEQGN5YmnJtTfJ4ujBdfy2EVAk8cUl8jtQskdFE84I-7eu59N9_pLA== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/refs.0~oBktD27DLW9QTHTv0MDsoaN2N6qCqZMwiFJeX7RwARc9fFan5V2awd_aThA9ZdCFTmHTSrdRglfQ5-ry9bJBUQ== +0 -0
- data/spec/fixtures/build_error.xcresult/Data/refs.0~sMF2ys5sALLwuAv5pBXjiul46mqlgymNeLHDD_y99cE5gPqv8vL-IHIBlpnlNYSO4VvKHlaNafxanp-NDJTh-A== +0 -0
- data/spec/fixtures/build_error.xcresult/Info.plist +29 -0
- data/spec/fixtures/pr_json.json +2 -2
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~0-xWm2AiZ5I3ekRhpAO8g4-GGm1rZIaTIaO2e60GD8nRSProBd-a_Yc1i7HKUd7bcVhfz2trCFFjRoELo2Srsw== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~0OZeLqccmhzjAKAPA0eS1xbrEYM0PXX1u6A91vWH_ALTk8ho004_4kSNB9wC5XH28w-WgXxARYsmR5za20WacA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~0S6H6SLQKxWYgRYf_D_1IY-6QHDo-BsTnbSwsmikZV81avlhu5M1VAH-NOUVMY64xcmrqOJTvhE3NuQQTem2Cw== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~2kkEPYCm3NJ7Qa1mJdA2u8iJvxvealDfVga3ndyyZs38sQL36q1IX7MYvrKo4eDbd-nyAQ96ZvSgaqpY4LJS1g== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~3_PlvRIvUTDBxcDG2Xfka2hgB7TiNgptAFA36_GXRa52Nvcr0scZcjFMT5dD_zIOEF07s48D6roAaO5Fuhqm4A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~4G0wQRF6xQNh3N32d9TJzcahHXtF9nsz9VnT8U0otA3r2iR598yAPi99CNnJ6RdVZdbjKKM5mOz4wlM-xL99GQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~4ybc14a0wWeJTE6Wyco_E5GMC4AV1uhumwDmYN_qe_Xatx7ngcL09_ef5aIBySSqpNNu4zcclYpHn9GrlNRuFQ== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~6gayYzI1pf7Ae5plNUTUjxPN56sJMCVjiFgbL47tofr0MkqR24pCBQ_WR8ObwxOF1d0CMgO6xzegongDrChlJg== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~8IYU0zHEOjhUXKlujKg1LRsjykPpzvWzofthV0L5wC4B7k8gHyaZ-7cZuqFSoPtzJazWCx-EKgYEH2IqJWzfEg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~8sQuTfDcyJlc0Fi-_NLh3a8jvYBs_okTaD87IqdKyCzN32fu0jp6ApVWBgFD38xL2_Q87YDxQ6IxUZv7NNvqow== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~CJoU5w7TNA2we8IxsH6JLXhJ2Tgwn4MNMGYzl5g5KiXF8gJQm6HlNTnQ1LSu2ISGxTLCQ9g-epXuzLU5utBfFA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~E-76cUuxKNsc00En6QiGIdNWgUkhPKWbzbY-g7Xs1I8QHEMM8XUyKPxeMCp0ZXs_s4n1v1-sgg4Cr_BgvCBB6Q== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~ES9w2o-hBWjCbFGFTzMnh3Y8PpOwPGSGtWZ9X9jy-xdmxdZNKNzsKpz5MRG0TSYYKul6Y0HPDMb6NUx1KCvp1g== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~H9Ox0jwnLyzNmCS9JM53xW5lgvG9wCoyFrOocfEMniMt9ZomGQCEAkcpEABl2RAkEJrYWhbW_Rrvy0_m93Jnnw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~LCIporNdr1dPYSczSS8zeRwLlf3Cq-xsjXgA0FzrCLqqpRmUcrJDAa5R7STT0lyZeGi2M13jXHyGZ5rZ7qCrrQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~LpdFNGBXQ0G_AiEBUv6jWVmPykDLvumWlLqe9FOU9Sautm_uAIUhkdYsC3Ai7CHCV6Ec_A9EgLa5dzbuBuSm0Q== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~MPQdxkf7R97XmBRC6k_HRasY3Wpzf6Ji9mPhXyPVbkbZreWJ4iOdeDBLCRqR2Jn_ffDNfJCvU4gSl6NdwqltzA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~Mbg926q5J0cd3yItw2ktYihgAmF3Bs3imeg-AgyGMQYnQx0IUUFlnuY3xldjSVaGFNU4N892Usibic6TZXFbTw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~OZKuCYOwI0z3jDNmJQ-bb0OUCKuFWw1iz9Na6m-M3pOyVRqP09YONvdvG1ezCE57EI5b8Ym9g8hX1ZVZJg124w== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~P1yCjbYuC-f-Yp5vY3jDumuu5B5U2_SdjxLObNcTH3XZMXTGlY9I20IlZP6UkWOIIPSr4IYewBY82b4sq82ldw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~PgE51YCf92l9xvNpSiVbHOmsnaRpxz_zGezAUjflsYK7nfGH7YRTDdb1jnNn0WlHUlme8-fO8fPQRJ9n51hfPg== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~QLGQgkmvGM1G0GFHWwBAJoAn881RCWKI51niXWwchH2k_1ahgBUMANJWO98yUC5HwqptnBQLC0aoD4GE7Zb3Yg== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~QdTITudcOZvjswLWT8gvlQMZHVJJ5yA_GP2ZKrevsgAbABDadn3tsrUH4rbPPD0HZeZVi5oDNPTcqoaMnueJ6A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~TNVRLj0efZi3RNElgmBqJ-AnCofs0p8pnjLDsQw2TMFPfg6driapeVvOlnsFyOS_27P7ZHNiLt2xJ9kiE57VlA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~Vo-bwGSGWiUUFgBwAGdskHUHwVQh0q8hYJmYmmyHI4AVhbtLsMeJQyYvHOuTuPmJcJsX_4bDig3Mg1GPwE9oWw== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~YBV5ZYd3le3PYE4Xz7kCb4sj6ZJ25X18ArIVKxMOCZHZ479XzQByz07m8qpm3hIL3oUPozbag-zRSomHuRfKLQ== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~ZYx73XhABxgrY0rQpAJbZMCn_MDQFCJimII9c-ninClo_0ZErb0fGcXrX-8AkQ_8ngCyX1YyDzb825PzreCLFg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~_Vk-6Z65ePcSA8pCiCFHA53AP-PRZ6KqdEH_Su2CQbd3QM7P-By063lIn7SyLdlE1ENrRCOL_9VFHwb6Q2de4A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~aBrGz65aeXPVqACvo49xELHeqBawlmly6M_SmRa-iT99yzTiBp2st43mhwZEOVIgvsBEHLkKbH5oQpqjWgkueA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~amieE2Vo8zyuqmVg_XehREgJFzuJaWOzAODZVk_7d1g6p6Y_sPmomY580XqThK7-5nyr3Z3ZX8PBps4zPLU86A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~bC3ChphZGxwicYgFPaTJhJvXLOQJmKnAxXU_qdERqu-B1727kHJX61TfzqMUqRiPUwu5E9r_5RH_xoRYJ2L6gQ== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~dKm5kNy23i7r5zU946OFV5V5VysbNcVshgmPE1cDjnTybi4d2hDYQHf5DDhl2cd8blicZGSNT1U56_sMCeKgGA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~fOlw5DSt-BTx_3MEsZueO9WvR0v7M_4Qox6aT8izuwPfWLYDmQLCsC3_Hymzu9pvNdnU-hnLmqI7VHwds0tZJg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~fQN-Kpy21p-A8sCOyS-jK7ytWncDa2hFDzVN8GFtbxfcsSDqHuHlelgGVDfMRGaCjl0_YvECcpxkOXMSCMz-yA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~fg_OE_1GIKhnHZVCf6vX3IBffLrmbWUH4AsgsdCfNDOxp0B_FS01mzFt8QUR8SFpl0wzqzGZLqQjyYhO6RevrQ== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~gan-cZ22YZhS_xIHkTo3QDwbZPFY4kFjFla450U2lB0YvYEyKbq78RSwEXNISk5oLbXL4hT7MUx_j9YlvordmQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~gullQKRfJbsVcDBXIhfPjmm5JnaE0Beei-34BEkBv4R4RAuRHQMSnctdI5JXfKywafaWXcpQiYYRa9ukH7dA8w== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~ifHHINpGjhER45qG-5imtXxa30gPYyHpFGHLw-i9F-M4nTjIGxvHkfprtACth9aAoeu7xyBFp9i0NZuPFaK-qQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~j4nemHY9VBZOlHsEur0YydlrsprTU9r-MZEFaCsZ71qzr_Y2j_wX_zeb8BIyCfQq6WCHDuJGwCvDxYGxFHFKJQ== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~jLNWr6BK3vDe2KRCbTLDhymPjtRFa0UT1BKEjXSbv29IXEwjhP4bUKt6LMUdkCtM4FvPlQ8z7YOpAYFoZFSPOA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~jLxEh4TDlOXovDeeA90ahrPFfK6KWCWAM1RveDzpglwOI01s2gFfzKcZ5uuMA4PDXedeCvNf2DqCdKJIcgHnVQ== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~lDipbRFZoMGAPyIHXNVPjW96huFRLV5fDc8iChQGTp2D1rW9Y3yat6jqgAUFtF94uKKChvQXQU2YOrKELWTWRQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~m1Fg2athRJukt11SG2HxPjSj8K7CqPcdkSiJSNtxUGsVPezdEjZT_PPnBkROObmplPJ7SQmO9ccwDfGagdcKLg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~oRMi0sbQLktfDDDGUS-SqBKpdDiD6HCztVES_ShfGr0KVcYENoIq7y9oUSDWL5B_P2gkdtWG8JEsJLxPbdWOZA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~oRai0E4F38qqrWTBu_VggauLdzUNvBJ9uOpjjW4rdru1cdBUSmJsWp7wGRoTaegMas7lrFfF7hqYW76UAkN_Aw== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~oc4kwngaTuUPiuwoua8qsQolC7-ZoEhH98wttJsSLjXvqDEIcMSdd0Y06IcfLovOve5P5sgs01gVV9FxgA9Cgg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~pfWL_0E_rKWkISZ_-ykT-jtTq0T1Bs4pRoI0Rvd1L48EF2pJwep6TzEd_f2AXvlBLDYPKU_8b0hRyDco495MuA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~qvKb6_pMbXLkop24YkPLBvBGPB0vTCJVE1x5_F3lvNeXSrkS-aTEVLcbm50ypOEDTvq5lWbE3WCTmiwTrycTtA== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~rWtEuNODRlqS4h5IKE2daTjC3jn_FFVbc5AFmP9pWRCMe5Pnl26q-RtgyD_RKEch9v3KhAMX6v_o_6tAvVJqCA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~ryOJ0LA52DIkg1NBt38A9g4laq_cWjst7WaY2GqaYbfcPtErYNGwwseRWOUJ888fdbPpei28zwb3FQmyyY0P7A== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~ufMI-FnN2y3q-eI9BtVFtGpA8_fkrqmtH5a6cmoMsFqJdZ7LAFu1X1f-KhV78VbCx3NJFw-Z37YrEEheJ0aoew== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~vFXD8mGF6_qQ0OnB0Wcon_YnvTiD4pn7MUywowp2zOVLErpHH1Ub9F67rFgJUj5qH44PC8HGhivGatweCwtA1g== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~xgcJ3zOq4tRMu41EmxgQwt9WxpLQm2v2wbY1e8CAQ8EEYhNYnBcMTAFjYWFgIg4LKguSsH1Djbu9dtiDJ6ZXww== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~ygm24RJKzu1R3AxMJebgBRXDXv1XqRs_UZUYB9XNRQlwNRqHlLdmUDM2A0c5MZ0rM9Rzk8J6DVpUtgbXCqdEig== +1 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~z0TKqUleKKN7fLZIVvFv3iQkQDn9im3HWNWKHBCNC0CrWtbKyMM79u3yFkfV0iz5I-pyszXp3C532_0QdYPUlA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/data.0~zs6Rgx87_LJyVnCSv0mqZMG6J9lpsTcTg9rpJsB_IBDSH2MQBeY5mGj-C3dLPzD8HFtKiumJ9EcGo-mGYqnZvQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~0-xWm2AiZ5I3ekRhpAO8g4-GGm1rZIaTIaO2e60GD8nRSProBd-a_Yc1i7HKUd7bcVhfz2trCFFjRoELo2Srsw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~0OZeLqccmhzjAKAPA0eS1xbrEYM0PXX1u6A91vWH_ALTk8ho004_4kSNB9wC5XH28w-WgXxARYsmR5za20WacA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~0S6H6SLQKxWYgRYf_D_1IY-6QHDo-BsTnbSwsmikZV81avlhu5M1VAH-NOUVMY64xcmrqOJTvhE3NuQQTem2Cw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~2kkEPYCm3NJ7Qa1mJdA2u8iJvxvealDfVga3ndyyZs38sQL36q1IX7MYvrKo4eDbd-nyAQ96ZvSgaqpY4LJS1g== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~3_PlvRIvUTDBxcDG2Xfka2hgB7TiNgptAFA36_GXRa52Nvcr0scZcjFMT5dD_zIOEF07s48D6roAaO5Fuhqm4A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~4G0wQRF6xQNh3N32d9TJzcahHXtF9nsz9VnT8U0otA3r2iR598yAPi99CNnJ6RdVZdbjKKM5mOz4wlM-xL99GQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~4ybc14a0wWeJTE6Wyco_E5GMC4AV1uhumwDmYN_qe_Xatx7ngcL09_ef5aIBySSqpNNu4zcclYpHn9GrlNRuFQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~6gayYzI1pf7Ae5plNUTUjxPN56sJMCVjiFgbL47tofr0MkqR24pCBQ_WR8ObwxOF1d0CMgO6xzegongDrChlJg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~8IYU0zHEOjhUXKlujKg1LRsjykPpzvWzofthV0L5wC4B7k8gHyaZ-7cZuqFSoPtzJazWCx-EKgYEH2IqJWzfEg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~8sQuTfDcyJlc0Fi-_NLh3a8jvYBs_okTaD87IqdKyCzN32fu0jp6ApVWBgFD38xL2_Q87YDxQ6IxUZv7NNvqow== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~CJoU5w7TNA2we8IxsH6JLXhJ2Tgwn4MNMGYzl5g5KiXF8gJQm6HlNTnQ1LSu2ISGxTLCQ9g-epXuzLU5utBfFA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~E-76cUuxKNsc00En6QiGIdNWgUkhPKWbzbY-g7Xs1I8QHEMM8XUyKPxeMCp0ZXs_s4n1v1-sgg4Cr_BgvCBB6Q== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~ES9w2o-hBWjCbFGFTzMnh3Y8PpOwPGSGtWZ9X9jy-xdmxdZNKNzsKpz5MRG0TSYYKul6Y0HPDMb6NUx1KCvp1g== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~H9Ox0jwnLyzNmCS9JM53xW5lgvG9wCoyFrOocfEMniMt9ZomGQCEAkcpEABl2RAkEJrYWhbW_Rrvy0_m93Jnnw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~LCIporNdr1dPYSczSS8zeRwLlf3Cq-xsjXgA0FzrCLqqpRmUcrJDAa5R7STT0lyZeGi2M13jXHyGZ5rZ7qCrrQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~LpdFNGBXQ0G_AiEBUv6jWVmPykDLvumWlLqe9FOU9Sautm_uAIUhkdYsC3Ai7CHCV6Ec_A9EgLa5dzbuBuSm0Q== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~MPQdxkf7R97XmBRC6k_HRasY3Wpzf6Ji9mPhXyPVbkbZreWJ4iOdeDBLCRqR2Jn_ffDNfJCvU4gSl6NdwqltzA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~Mbg926q5J0cd3yItw2ktYihgAmF3Bs3imeg-AgyGMQYnQx0IUUFlnuY3xldjSVaGFNU4N892Usibic6TZXFbTw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~OZKuCYOwI0z3jDNmJQ-bb0OUCKuFWw1iz9Na6m-M3pOyVRqP09YONvdvG1ezCE57EI5b8Ym9g8hX1ZVZJg124w== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~P1yCjbYuC-f-Yp5vY3jDumuu5B5U2_SdjxLObNcTH3XZMXTGlY9I20IlZP6UkWOIIPSr4IYewBY82b4sq82ldw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~PgE51YCf92l9xvNpSiVbHOmsnaRpxz_zGezAUjflsYK7nfGH7YRTDdb1jnNn0WlHUlme8-fO8fPQRJ9n51hfPg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~QLGQgkmvGM1G0GFHWwBAJoAn881RCWKI51niXWwchH2k_1ahgBUMANJWO98yUC5HwqptnBQLC0aoD4GE7Zb3Yg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~QdTITudcOZvjswLWT8gvlQMZHVJJ5yA_GP2ZKrevsgAbABDadn3tsrUH4rbPPD0HZeZVi5oDNPTcqoaMnueJ6A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~TNVRLj0efZi3RNElgmBqJ-AnCofs0p8pnjLDsQw2TMFPfg6driapeVvOlnsFyOS_27P7ZHNiLt2xJ9kiE57VlA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~Vo-bwGSGWiUUFgBwAGdskHUHwVQh0q8hYJmYmmyHI4AVhbtLsMeJQyYvHOuTuPmJcJsX_4bDig3Mg1GPwE9oWw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~YBV5ZYd3le3PYE4Xz7kCb4sj6ZJ25X18ArIVKxMOCZHZ479XzQByz07m8qpm3hIL3oUPozbag-zRSomHuRfKLQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~ZYx73XhABxgrY0rQpAJbZMCn_MDQFCJimII9c-ninClo_0ZErb0fGcXrX-8AkQ_8ngCyX1YyDzb825PzreCLFg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~_Vk-6Z65ePcSA8pCiCFHA53AP-PRZ6KqdEH_Su2CQbd3QM7P-By063lIn7SyLdlE1ENrRCOL_9VFHwb6Q2de4A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~aBrGz65aeXPVqACvo49xELHeqBawlmly6M_SmRa-iT99yzTiBp2st43mhwZEOVIgvsBEHLkKbH5oQpqjWgkueA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~amieE2Vo8zyuqmVg_XehREgJFzuJaWOzAODZVk_7d1g6p6Y_sPmomY580XqThK7-5nyr3Z3ZX8PBps4zPLU86A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~bC3ChphZGxwicYgFPaTJhJvXLOQJmKnAxXU_qdERqu-B1727kHJX61TfzqMUqRiPUwu5E9r_5RH_xoRYJ2L6gQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~dKm5kNy23i7r5zU946OFV5V5VysbNcVshgmPE1cDjnTybi4d2hDYQHf5DDhl2cd8blicZGSNT1U56_sMCeKgGA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~fOlw5DSt-BTx_3MEsZueO9WvR0v7M_4Qox6aT8izuwPfWLYDmQLCsC3_Hymzu9pvNdnU-hnLmqI7VHwds0tZJg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~fQN-Kpy21p-A8sCOyS-jK7ytWncDa2hFDzVN8GFtbxfcsSDqHuHlelgGVDfMRGaCjl0_YvECcpxkOXMSCMz-yA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~fg_OE_1GIKhnHZVCf6vX3IBffLrmbWUH4AsgsdCfNDOxp0B_FS01mzFt8QUR8SFpl0wzqzGZLqQjyYhO6RevrQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~gan-cZ22YZhS_xIHkTo3QDwbZPFY4kFjFla450U2lB0YvYEyKbq78RSwEXNISk5oLbXL4hT7MUx_j9YlvordmQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~gullQKRfJbsVcDBXIhfPjmm5JnaE0Beei-34BEkBv4R4RAuRHQMSnctdI5JXfKywafaWXcpQiYYRa9ukH7dA8w== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~ifHHINpGjhER45qG-5imtXxa30gPYyHpFGHLw-i9F-M4nTjIGxvHkfprtACth9aAoeu7xyBFp9i0NZuPFaK-qQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~j4nemHY9VBZOlHsEur0YydlrsprTU9r-MZEFaCsZ71qzr_Y2j_wX_zeb8BIyCfQq6WCHDuJGwCvDxYGxFHFKJQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~jLNWr6BK3vDe2KRCbTLDhymPjtRFa0UT1BKEjXSbv29IXEwjhP4bUKt6LMUdkCtM4FvPlQ8z7YOpAYFoZFSPOA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~jLxEh4TDlOXovDeeA90ahrPFfK6KWCWAM1RveDzpglwOI01s2gFfzKcZ5uuMA4PDXedeCvNf2DqCdKJIcgHnVQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~lDipbRFZoMGAPyIHXNVPjW96huFRLV5fDc8iChQGTp2D1rW9Y3yat6jqgAUFtF94uKKChvQXQU2YOrKELWTWRQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~m1Fg2athRJukt11SG2HxPjSj8K7CqPcdkSiJSNtxUGsVPezdEjZT_PPnBkROObmplPJ7SQmO9ccwDfGagdcKLg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~oRMi0sbQLktfDDDGUS-SqBKpdDiD6HCztVES_ShfGr0KVcYENoIq7y9oUSDWL5B_P2gkdtWG8JEsJLxPbdWOZA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~oRai0E4F38qqrWTBu_VggauLdzUNvBJ9uOpjjW4rdru1cdBUSmJsWp7wGRoTaegMas7lrFfF7hqYW76UAkN_Aw== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~oc4kwngaTuUPiuwoua8qsQolC7-ZoEhH98wttJsSLjXvqDEIcMSdd0Y06IcfLovOve5P5sgs01gVV9FxgA9Cgg== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~pfWL_0E_rKWkISZ_-ykT-jtTq0T1Bs4pRoI0Rvd1L48EF2pJwep6TzEd_f2AXvlBLDYPKU_8b0hRyDco495MuA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~qvKb6_pMbXLkop24YkPLBvBGPB0vTCJVE1x5_F3lvNeXSrkS-aTEVLcbm50ypOEDTvq5lWbE3WCTmiwTrycTtA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~rWtEuNODRlqS4h5IKE2daTjC3jn_FFVbc5AFmP9pWRCMe5Pnl26q-RtgyD_RKEch9v3KhAMX6v_o_6tAvVJqCA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~ryOJ0LA52DIkg1NBt38A9g4laq_cWjst7WaY2GqaYbfcPtErYNGwwseRWOUJ888fdbPpei28zwb3FQmyyY0P7A== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~ufMI-FnN2y3q-eI9BtVFtGpA8_fkrqmtH5a6cmoMsFqJdZ7LAFu1X1f-KhV78VbCx3NJFw-Z37YrEEheJ0aoew== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~vFXD8mGF6_qQ0OnB0Wcon_YnvTiD4pn7MUywowp2zOVLErpHH1Ub9F67rFgJUj5qH44PC8HGhivGatweCwtA1g== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~xgcJ3zOq4tRMu41EmxgQwt9WxpLQm2v2wbY1e8CAQ8EEYhNYnBcMTAFjYWFgIg4LKguSsH1Djbu9dtiDJ6ZXww== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~ygm24RJKzu1R3AxMJebgBRXDXv1XqRs_UZUYB9XNRQlwNRqHlLdmUDM2A0c5MZ0rM9Rzk8J6DVpUtgbXCqdEig== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~z0TKqUleKKN7fLZIVvFv3iQkQDn9im3HWNWKHBCNC0CrWtbKyMM79u3yFkfV0iz5I-pyszXp3C532_0QdYPUlA== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Data/refs.0~zs6Rgx87_LJyVnCSv0mqZMG6J9lpsTcTg9rpJsB_IBDSH2MQBeY5mGj-C3dLPzD8HFtKiumJ9EcGo-mGYqnZvQ== +0 -0
- data/spec/fixtures/swiftlint.xcresult/Info.plist +29 -0
- data/spec/spec_helper.rb +5 -2
- data/spec/xcode_summary_spec.rb +113 -106
- metadata +282 -25
- data/spec/fixtures/errors.json +0 -31
- data/spec/fixtures/ld_warnings.json +0 -31
- data/spec/fixtures/summary.json +0 -44
- data/spec/fixtures/summary_messages.json +0 -5
- data/spec/fixtures/summary_with_empty_line.json +0 -37
- data/spec/fixtures/test_errors.json +0 -11
- data/spec/fixtures/warnings_errors.json +0 -32
data/lib/xcode_summary/plugin.rb
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'json'
|
4
|
+
require 'xcresult'
|
4
5
|
|
5
6
|
module Danger
|
6
7
|
# Shows all build errors, warnings and unit tests results generated from `xcodebuild`.
|
7
|
-
# You need to use
|
8
|
-
# with [xcpretty-json-formatter](https://github.com/marcelofabri/xcpretty-json-formatter)
|
9
|
-
# to generate a JSON file that this plugin can read.
|
8
|
+
# You need to use the `xcresult` produced by Xcode 11. It's located in the Derived Data folder.
|
10
9
|
# @example Showing summary
|
11
10
|
#
|
12
|
-
# xcode_summary.report '
|
11
|
+
# xcode_summary.report 'build.xcresult'
|
13
12
|
#
|
14
13
|
# @example Filtering warnings in Pods
|
15
14
|
#
|
16
15
|
# xcode_summary.ignored_files = '**/Pods/**'
|
17
|
-
# xcode_summary.report '
|
16
|
+
# xcode_summary.report 'build.xcresult'
|
18
17
|
#
|
19
18
|
# @see diogot/danger-xcode_summary
|
20
19
|
# @tags xcode, xcodebuild, format
|
@@ -44,18 +43,6 @@ module Danger
|
|
44
43
|
# @return [Block]
|
45
44
|
attr_accessor :ignored_results
|
46
45
|
|
47
|
-
# Defines if the test summary will be sticky or not.
|
48
|
-
# Defaults to `false`.
|
49
|
-
# @param [Boolean] value
|
50
|
-
# @return [Boolean]
|
51
|
-
attr_accessor :sticky_summary
|
52
|
-
|
53
|
-
# Defines if the build summary is shown or not.
|
54
|
-
# Defaults to `true`.
|
55
|
-
# @param [Boolean] value
|
56
|
-
# @return [Boolean]
|
57
|
-
attr_accessor :test_summary
|
58
|
-
|
59
46
|
# Defines if using inline comment or not.
|
60
47
|
# Defaults to `false`.
|
61
48
|
# @param [Boolean] value
|
@@ -68,6 +55,12 @@ module Danger
|
|
68
55
|
# @return [Boolean]
|
69
56
|
attr_accessor :ignores_warnings
|
70
57
|
|
58
|
+
# Defines errors strict. If value is `false`, then errors will be reporting as warnings.
|
59
|
+
# Defaults to `true`
|
60
|
+
# @param [Boolean] value
|
61
|
+
# @return [Boolean]
|
62
|
+
attr_accessor :strict
|
63
|
+
|
71
64
|
# rubocop:disable Lint/DuplicateMethods
|
72
65
|
def project_root
|
73
66
|
root = @project_root || Dir.pwd
|
@@ -83,14 +76,6 @@ module Danger
|
|
83
76
|
@ignored_results ||= block
|
84
77
|
end
|
85
78
|
|
86
|
-
def sticky_summary
|
87
|
-
@sticky_summary || false
|
88
|
-
end
|
89
|
-
|
90
|
-
def test_summary
|
91
|
-
@test_summary.nil? ? true : @test_summary
|
92
|
-
end
|
93
|
-
|
94
79
|
def inline_mode
|
95
80
|
@inline_mode || false
|
96
81
|
end
|
@@ -99,36 +84,46 @@ module Danger
|
|
99
84
|
@ignores_warnings || false
|
100
85
|
end
|
101
86
|
|
87
|
+
def strict
|
88
|
+
@strict.nil? ? true : @strict
|
89
|
+
end
|
90
|
+
|
102
91
|
# Pick a Dangerfile plugin for a chosen request_source and cache it
|
103
92
|
# based on https://github.com/danger/danger/blob/master/lib/danger/plugin_support/plugin.rb#L31
|
93
|
+
#
|
94
|
+
# @return [void]
|
104
95
|
def plugin
|
105
96
|
plugins = Plugin.all_plugins.select { |plugin| Dangerfile.essential_plugin_classes.include? plugin }
|
106
97
|
@plugin ||= plugins.select { |p| p.method_defined? :html_link }.map { |p| p.new(@dangerfile) }.compact.first
|
107
98
|
end
|
108
99
|
# rubocop:enable Lint/DuplicateMethods
|
109
100
|
|
110
|
-
# Reads a
|
101
|
+
# Reads a `.xcresult` and reports it.
|
111
102
|
#
|
112
|
-
# @param [String] file_path Path for
|
103
|
+
# @param [String] file_path Path for xcresult bundle.
|
113
104
|
# @return [void]
|
114
105
|
def report(file_path)
|
115
|
-
if File.
|
116
|
-
xcode_summary =
|
106
|
+
if File.exist?(file_path)
|
107
|
+
xcode_summary = XCResult::Parser.new(path: file_path)
|
117
108
|
format_summary(xcode_summary)
|
118
109
|
else
|
119
110
|
fail 'summary file not found'
|
120
111
|
end
|
121
112
|
end
|
122
113
|
|
123
|
-
# Reads a
|
114
|
+
# Reads a `.xcresult` and reports its warning and error count.
|
124
115
|
#
|
125
|
-
# @param [String] file_path Path for
|
116
|
+
# @param [String] file_path Path for xcresult bundle.
|
126
117
|
# @return [String] JSON string with warningCount and errorCount
|
127
118
|
def warning_error_count(file_path)
|
128
|
-
if File.
|
129
|
-
xcode_summary =
|
130
|
-
warning_count =
|
131
|
-
error_count =
|
119
|
+
if File.exist?(file_path)
|
120
|
+
xcode_summary = XCResult::Parser.new(path: file_path)
|
121
|
+
warning_count = 0
|
122
|
+
error_count = 0
|
123
|
+
xcode_summary.actions_invocation_record.actions.each do |action|
|
124
|
+
warning_count += warnings(action).count
|
125
|
+
error_count += errors(action).count
|
126
|
+
end
|
132
127
|
result = { warnings: warning_count, errors: error_count }
|
133
128
|
result.to_json
|
134
129
|
else
|
@@ -139,99 +134,90 @@ module Danger
|
|
139
134
|
private
|
140
135
|
|
141
136
|
def format_summary(xcode_summary)
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
137
|
+
xcode_summary.actions_invocation_record.actions.each do |action|
|
138
|
+
warnings(action).each do |result|
|
139
|
+
if inline_mode && result.location
|
140
|
+
warn(result.message, sticky: false, file: result.location.file_path, line: result.location.line)
|
141
|
+
else
|
142
|
+
warn(result.message, sticky: false)
|
143
|
+
end
|
148
144
|
end
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
145
|
+
errors(action).each do |result|
|
146
|
+
if inline_mode && result.location
|
147
|
+
if strict
|
148
|
+
fail(result.message, sticky: false, file: result.location.file_path, line: result.location.line)
|
149
|
+
else
|
150
|
+
warn(result.message, sticky: false, file: result.location.file_path, line: result.location.line)
|
151
|
+
end
|
152
|
+
else
|
153
|
+
if strict
|
154
|
+
fail(result.message, sticky: false)
|
155
|
+
else
|
156
|
+
warn(result.message, sticky: false)
|
157
|
+
end
|
158
|
+
end
|
155
159
|
end
|
156
160
|
end
|
157
161
|
end
|
158
162
|
|
159
|
-
def
|
160
|
-
if
|
161
|
-
[
|
162
|
-
xcode_summary[:tests_summary_messages]
|
163
|
-
].flatten.uniq.compact.map(&:strip)
|
164
|
-
else
|
165
|
-
[]
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
|
-
def warnings(xcode_summary)
|
170
|
-
if ignores_warnings
|
171
|
-
return []
|
172
|
-
end
|
163
|
+
def warnings(action)
|
164
|
+
return [] if ignores_warnings
|
173
165
|
|
174
166
|
warnings = [
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
167
|
+
action.action_result.issues.warning_summaries,
|
168
|
+
action.build_result.issues.warning_summaries
|
169
|
+
].flatten.compact.map do |summary|
|
170
|
+
result = Result.new(summary.message, parse_location(summary.document_location_in_creating_workspace))
|
171
|
+
Result.new(format_warning(result), result.location)
|
172
|
+
end
|
173
|
+
warnings = warnings.uniq.reject { |result| result.message.nil? }
|
181
174
|
warnings.delete_if(&ignored_results)
|
182
175
|
end
|
183
176
|
|
184
|
-
def errors(
|
177
|
+
def errors(action)
|
185
178
|
errors = [
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
end,
|
193
|
-
xcode_summary.fetch(:undefined_symbols_errors, {}).map do |h|
|
194
|
-
Result.new(format_undefined_symbols(h), nil)
|
195
|
-
end,
|
196
|
-
xcode_summary.fetch(:duplicate_symbols_errors, {}).map do |h|
|
197
|
-
Result.new(format_duplicate_symbols(h), nil)
|
198
|
-
end,
|
199
|
-
xcode_summary.fetch(:tests_failures, {}).map do |test_suite, failures|
|
200
|
-
failures.map do |failure|
|
201
|
-
Result.new(format_test_failure(test_suite, failure), parse_test_location(failure))
|
202
|
-
end
|
203
|
-
end
|
204
|
-
].flatten.uniq.compact.reject { |result| result.message.nil? }
|
205
|
-
errors.delete_if(&ignored_results)
|
206
|
-
end
|
179
|
+
action.action_result.issues.error_summaries,
|
180
|
+
action.build_result.issues.error_summaries
|
181
|
+
].flatten.compact.map do |summary|
|
182
|
+
result = Result.new(summary.message, parse_location(summary.document_location_in_creating_workspace))
|
183
|
+
Result.new(format_warning(result), result.location)
|
184
|
+
end
|
207
185
|
|
208
|
-
|
209
|
-
|
210
|
-
|
186
|
+
test_failures = [
|
187
|
+
action.action_result.issues.test_failure_summaries,
|
188
|
+
action.build_result.issues.test_failure_summaries
|
189
|
+
].flatten.compact.map do |summary|
|
190
|
+
result = Result.new(summary.message, parse_location(summary.document_location_in_creating_workspace))
|
191
|
+
Result.new(format_test_failure(result, summary.producing_target, summary.test_case_name),
|
192
|
+
result.location)
|
193
|
+
end
|
194
|
+
|
195
|
+
results = (errors + test_failures).uniq.reject { |result| result.message.nil? }
|
196
|
+
results.delete_if(&ignored_results)
|
211
197
|
end
|
212
198
|
|
213
|
-
def
|
214
|
-
|
215
|
-
|
216
|
-
|
199
|
+
def parse_location(document_location)
|
200
|
+
return nil if document_location.nil?
|
201
|
+
|
202
|
+
file_path = document_location.url.gsub('file://', '').split('#').first
|
203
|
+
file_name = file_path.split('/').last
|
204
|
+
fragment = document_location.url.split('#').last
|
205
|
+
params = CGI.parse(fragment).transform_values(&:first)
|
206
|
+
line_number = params['StartingLineNumber']
|
207
|
+
line = line_number.empty? ? -0 : line_number.to_i + 1 # StartingLineNumber is 0-based, but we need a 1-based value
|
208
|
+
Location.new(file_name, relative_path(file_path), line)
|
217
209
|
end
|
218
210
|
|
219
|
-
def format_path(
|
211
|
+
def format_path(file_path, line)
|
220
212
|
if plugin
|
221
|
-
|
222
|
-
path
|
213
|
+
path = file_path
|
214
|
+
path += "#L#{line}" if line
|
223
215
|
plugin.html_link(path)
|
224
216
|
else
|
225
|
-
|
217
|
+
file_path
|
226
218
|
end
|
227
219
|
end
|
228
220
|
|
229
|
-
def parse_filename(path)
|
230
|
-
regex = /^(.*?):(\d*):?\d*$/
|
231
|
-
match = path.match(regex)
|
232
|
-
match&.captures
|
233
|
-
end
|
234
|
-
|
235
221
|
def relative_path(path)
|
236
222
|
return nil if project_root.nil?
|
237
223
|
|
@@ -239,8 +225,6 @@ module Danger
|
|
239
225
|
end
|
240
226
|
|
241
227
|
def should_ignore_warning?(path)
|
242
|
-
parsed = parse_filename(path)
|
243
|
-
path = parsed.first || path
|
244
228
|
ignored_files.any? { |pattern| File.fnmatch(pattern, path) }
|
245
229
|
end
|
246
230
|
|
@@ -248,44 +232,22 @@ module Danger
|
|
248
232
|
reason.gsub('>', '\>').gsub('<', '\<')
|
249
233
|
end
|
250
234
|
|
251
|
-
def
|
252
|
-
|
253
|
-
return nil if should_ignore_warning?(path)
|
254
|
-
|
255
|
-
path_link = format_path(path)
|
235
|
+
def format_warning(result)
|
236
|
+
return escape_reason(result.message) if result.location.nil?
|
256
237
|
|
257
|
-
|
258
|
-
|
259
|
-
"#{warning}" \
|
260
|
-
"```\n" \
|
261
|
-
"#{input[:line]}\n" \
|
262
|
-
'```'
|
263
|
-
else
|
264
|
-
warning
|
265
|
-
end
|
266
|
-
end
|
267
|
-
|
268
|
-
def format_format_file_missing_error(input)
|
269
|
-
path = relative_path(input[:file_path])
|
270
|
-
path_link = format_path(path)
|
271
|
-
"**#{escape_reason(input[:reason])}**: #{path_link}"
|
272
|
-
end
|
238
|
+
path = result.location.file_path
|
239
|
+
return nil if should_ignore_warning?(path)
|
273
240
|
|
274
|
-
|
275
|
-
"#{input[:message]} <br />" \
|
276
|
-
"> Symbol: #{input[:symbol]} <br />" \
|
277
|
-
"> Referenced from: #{input[:reference]}"
|
278
|
-
end
|
241
|
+
path_link = format_path(path, result.location.line)
|
279
242
|
|
280
|
-
|
281
|
-
"#{input[:message]} <br />" \
|
282
|
-
"> #{input[:file_paths].map { |path| path.split('/').last }.join('<br /> ')}"
|
243
|
+
"**#{path_link}**: #{escape_reason(result.message)}"
|
283
244
|
end
|
284
245
|
|
285
|
-
def format_test_failure(
|
286
|
-
path =
|
287
|
-
path_link = format_path(path)
|
288
|
-
|
246
|
+
def format_test_failure(result, producing_target, test_case_name)
|
247
|
+
path = result.location.file_path
|
248
|
+
path_link = format_path(path, result.location.line)
|
249
|
+
suite_name = "#{producing_target}.#{test_case_name}"
|
250
|
+
"**#{suite_name}**: #{escape_reason(result.message)} <br /> #{path_link}"
|
289
251
|
end
|
290
252
|
end
|
291
253
|
end
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"scheduling.log","type":1}]
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"SwiftLintFrameworkTests-717D31B2-998D-443A-9732-83EBCBA9820A","type":2}]
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>dateCreated</key>
|
6
|
+
<date>2019-09-27T07:22:32Z</date>
|
7
|
+
<key>externalLocations</key>
|
8
|
+
<array/>
|
9
|
+
<key>rootId</key>
|
10
|
+
<dict>
|
11
|
+
<key>hash</key>
|
12
|
+
<string>0~sMF2ys5sALLwuAv5pBXjiul46mqlgymNeLHDD_y99cE5gPqv8vL-IHIBlpnlNYSO4VvKHlaNafxanp-NDJTh-A==</string>
|
13
|
+
</dict>
|
14
|
+
<key>storage</key>
|
15
|
+
<dict>
|
16
|
+
<key>backend</key>
|
17
|
+
<string>fileBacked2</string>
|
18
|
+
<key>compression</key>
|
19
|
+
<string>standard</string>
|
20
|
+
</dict>
|
21
|
+
<key>version</key>
|
22
|
+
<dict>
|
23
|
+
<key>major</key>
|
24
|
+
<integer>3</integer>
|
25
|
+
<key>minor</key>
|
26
|
+
<integer>21</integer>
|
27
|
+
</dict>
|
28
|
+
</dict>
|
29
|
+
</plist>
|
data/spec/fixtures/pr_json.json
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"tmp","type":2}]
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"3F900B69-F5EC-478D-BA29-87F9FB623201","type":2}]
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"F9CCDEE8-4362-4C21-B875-F7B8F18F3544","type":2}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"remote-container","type":2}]
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"SwiftLintFrameworkTests-3F900B69-F5EC-478D-BA29-87F9FB623201.xctestconfiguration","type":1}]
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"tmp","type":2}]
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"remote-container","type":2}]
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"testmanagerd.log","type":1}]
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"tmp","type":2}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"77498EA3-2A59-44A5-B19F-A0C57B3EC49F","type":2}]
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"tmp","type":2}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"E93E260B-423F-4759-8BD9-2AE47867F8DD","type":2}]
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"remote-container","type":2}]
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"SwiftLintFrameworkTests-F9CCDEE8-4362-4C21-B875-F7B8F18F3544.xctestconfiguration","type":1}]
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"remote-container","type":2}]
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"SwiftLintFrameworkTests-71CB433F-92ED-404B-8661-635EAA88242D.xctestconfiguration","type":1}]
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"SwiftLintFrameworkTests-77498EA3-2A59-44A5-B19F-A0C57B3EC49F.xctestconfiguration","type":1}]
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"remote-container","type":2}]
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"71CB433F-92ED-404B-8661-635EAA88242D","type":2}]
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"SwiftLintFrameworkTests-E93E260B-423F-4759-8BD9-2AE47867F8DD.xctestconfiguration","type":1}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"tmp","type":2}]
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|