<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>podhmo</author_name>
  <author_url>https://blog.hatena.ne.jp/podhmo/</author_url>
  <blog_title>podhmo's diary</blog_title>
  <blog_url>https://pod.hatenablog.com/</blog_url>
  <categories>
    <anon>git</anon>
    <anon>shell</anon>
  </categories>
  <description>CIでlintのついでにformatter(gofmt, goimports, gofumpt)がかかっているかチェックしている環境があるとする。そこでformatされていないと怒られたファイルに対してformatterをかけたい。その方法のメモ。 あるコミットで変更されたファイルを集める 対象のコミットで変更されたファイルの一覧を集めてformatterにかけたい git show --stat HEAD をparseしてみる? 例えば対象のコミットをHEADということにすると git show --stat HEAD の変更を利用するということが考えられる 以下の様な形。 $ git sh…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpod.hatenablog.com%2Fentry%2F2019%2F09%2F04%2F081801&quot; title=&quot;gitで更新のあったファイルに対してformatter(goimports)をかける - podhmo&amp;#39;s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-09-04 08:18:01</published>
  <title>gitで更新のあったファイルに対してformatter(goimports)をかける</title>
  <type>rich</type>
  <url>https://pod.hatenablog.com/entry/2019/09/04/081801</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
