{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/osquery/issues/1934","repository_url":"https://api.github.com/repos/facebook/osquery","labels_url":"https://api.github.com/repos/facebook/osquery/issues/1934/labels{/name}","comments_url":"https://api.github.com/repos/facebook/osquery/issues/1934/comments","events_url":"https://api.github.com/repos/facebook/osquery/issues/1934/events","html_url":"https://github.com/facebook/osquery/issues/1934","id":141161135,"number":1934,"title":"make format breaks raw strings","user":{"login":"zwass","id":575602,"avatar_url":"https://avatars.githubusercontent.com/u/575602?v=3","gravatar_id":"","url":"https://api.github.com/users/zwass","html_url":"https://github.com/zwass","followers_url":"https://api.github.com/users/zwass/followers","following_url":"https://api.github.com/users/zwass/following{/other_user}","gists_url":"https://api.github.com/users/zwass/gists{/gist_id}","starred_url":"https://api.github.com/users/zwass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwass/subscriptions","organizations_url":"https://api.github.com/users/zwass/orgs","repos_url":"https://api.github.com/users/zwass/repos","events_url":"https://api.github.com/users/zwass/events{/privacy}","received_events_url":"https://api.github.com/users/zwass/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-16T03:21:30Z","updated_at":"2016-03-16T03:21:30Z","closed_at":null,"body":"`make format` will change raw strings (see http://en.cppreference.com/w/cpp/language/string_literal (6)) in a way that causes both compiler and logical errors.\r\n\r\nTake the line:\r\n```\r\n  std::string json = R\"({\" foo \": \" Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmo \"})\";\r\n```\r\n\r\nAfter `make format`, this becomes\r\n```\r\n  std::string json = R \"({\" foo \": \" Lorem ipsum dolor sit amet,\r\n              consectetur adipiscing elit, sed do eiusmo \"})\";\r\n```\r\n\r\nThe space after the `R` results in a compiler error, and simply removing this space still leaves invalid JSON because the newlines are interpreted literally in a raw string. It's not particularly difficult to change this example back, but it's trickier with more complex JSON like in a unit test."}}