There is a good deal of extra text at the top of Object Scripts from SSMS Object Explorer -> Right Click -> "Script Object as".
With SSMS 17.2 its much worse (Scripting Parameters were added).
We often use SSMS to develop then check into TFS for builds.
Please add options in to disable the text below in Tools -> Options -> Sql Server Object Explorer -> Scripting.
The text below is an example of what we delete every time before editing or checking into TFS:
/* ==Scripting Parameters==
Source Server Version : SQL Server 2014 (12.0.5000)
Source Database Engine Edition : Microsoft SQL Server Enterprise Edition
Source Database Engine Type : Standalone SQL Server
Target Server Version : SQL Server 2014
Target Database Engine Edition : Microsoft SQL Server Standard Edition
Target Database Engine Type : Standalone SQL Server
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON