+ def check_sorted(self, fileobj):
+ """Check that includes within a file are sorted."""
+ # TODO: Make the checking work without full contents of the file
+ lines = fileobj.get_contents()
+ self._changed = False
+ for block in fileobj.get_include_blocks():
+ self._sort_include_block(block, lines)
+ return not self._changed
+